Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,22 @@ def pre_configure_hook_LAMMPS_zen4(self, *args, **kwargs):
else:
raise EasyBuildError("LAMMPS-specific hook triggered for non-LAMMPS easyconfig?!")

def pre_configure_hook_cmake_system(self, *args, **kwargs):
"""
pre-configure hook for cmake built with SYSTEM toolchain:
- unset configopts for cmake easyconfigs using the SYSTEM toolchain
- https://github.com/EESSI/software-layer/issues/1175
"""

if self.name == 'CMake':
if self.toolchain.name == 'system':
self.log.info("EESSI hook: unset configopts to build on top of EESSI compatibility layer")
self.log.info("https://github.com/EESSI/software-layer/issues/1175")
self.log.info(f"Current configopts before the EESSI custom hook: {self.cfg['configopts']}")
self.cfg['configopts'] = ''
self.log.info(f"Updated configopts after the EESSI custom hook: {self.cfg['configopts']}")
else:
raise EasyBuildError("CMake-specific hook triggered for non-CMake easyconfig?!")

def pre_test_hook(self, *args, **kwargs):
"""Main pre-test hook: trigger custom functions based on software name."""
Expand Down Expand Up @@ -1484,6 +1500,7 @@ def post_easyblock_hook(self, *args, **kwargs):
'LAMMPS': pre_configure_hook_LAMMPS_zen4,
'Score-P': pre_configure_hook_score_p,
'VSEARCH': pre_configure_hook_vsearch,
'CMake': pre_configure_hook_cmake_system,
}

PRE_TEST_HOOKS = {
Expand Down
Loading