Skip to content

Commit 45c006b

Browse files
committed
cmake hook to use ncurses library from EESSI
EESSI/software-layer#1175
1 parent 91a8a1d commit 45c006b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

eb_hooks.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,19 @@ def pre_configure_hook_LAMMPS_zen4(self, *args, **kwargs):
942942
else:
943943
raise EasyBuildError("LAMMPS-specific hook triggered for non-LAMMPS easyconfig?!")
944944

945+
def pre_configure_hook_cmake_system(self, *args, **kwargs):
946+
"""
947+
pre-configure hook for cmake built with SYSTEM toolchain:
948+
- unset configopts for cmake easyconfigs using the SYSTEM toolchain
949+
- https://github.com/EESSI/software-layer/issues/1175
950+
"""
951+
952+
if self.name == 'CMake':
953+
if self.toolchain.name == 'system':
954+
print_msg("Unset configopts to use ncurses library from the EESSI compatibility layer")
955+
self.cfg['configopts'] = ''
956+
else:
957+
raise EasyBuildError("CMake-specific hook triggered for non-CMake easyconfig?!")
945958

946959
def pre_test_hook(self, *args, **kwargs):
947960
"""Main pre-test hook: trigger custom functions based on software name."""
@@ -1484,6 +1497,7 @@ def post_easyblock_hook(self, *args, **kwargs):
14841497
'LAMMPS': pre_configure_hook_LAMMPS_zen4,
14851498
'Score-P': pre_configure_hook_score_p,
14861499
'VSEARCH': pre_configure_hook_vsearch,
1500+
'CMake': pre_configure_hook_cmake_system,
14871501
}
14881502

14891503
PRE_TEST_HOOKS = {

0 commit comments

Comments
 (0)