Skip to content

Commit

Permalink
Merge pull request #3088 from casparvl/set_cmake_python_selection_policy
Browse files Browse the repository at this point in the history
Apply CMake policy to select python based on PATH order, instead of highest version
  • Loading branch information
boegel authored Jan 26, 2024
2 parents c9f4bb9 + 5a46079 commit 941c1eb
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 941c1eb

Please sign in to comment.