Skip to content

Commit

Permalink
Set policy so that the python is selected based on location, i.e. the…
Browse files Browse the repository at this point in the history
… order in PATH, rather than the newest version (which might be an OS python).
  • Loading branch information
Caspar van Leeuwen committed Jan 23, 2024
1 parent 5106dfa commit 5a46079
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions easybuild/easyblocks/generic/cmakemake.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@ def configure_step(self, srcdir=None, builddir=None):
# see https://github.com/Kitware/CMake/commit/3ec9226779776811240bde88a3f173c29aa935b5
options['CMAKE_SKIP_RPATH'] = 'ON'

# make sure that newer CMAKE picks python based on location, not just the newest python
# Avoids issues like e.g. https://github.com/EESSI/software-layer/pull/370#issuecomment-1785594932
if LooseVersion(self.cmake_version) >= '3.15':
options['CMAKE_POLICY_DEFAULT_CMP0094'] = 'NEW'

# show what CMake is doing by default
options['CMAKE_VERBOSE_MAKEFILE'] = 'ON'

Expand Down

0 comments on commit 5a46079

Please sign in to comment.