Skip to content
Merged
Changes from 1 commit
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
14 changes: 14 additions & 0 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,19 @@ 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':
print_msg("Unset configopts to use ncurses library from the EESSI compatibility layer")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use self.log.info here, or print_msg with log=self.log if you want to be very verbose about this.

I would also log what the previous value of configopts was, so it's clear what's being wiped.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boegel I have updated the log messages as suggested

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 +1497,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