@@ -942,23 +942,25 @@ def pre_configure_hook_LAMMPS_zen4(self, *args, **kwargs):
942
942
else :
943
943
raise EasyBuildError ("LAMMPS-specific hook triggered for non-LAMMPS easyconfig?!" )
944
944
945
+
945
946
def pre_configure_hook_cmake_system (self , * args , ** kwargs ):
946
947
"""
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
948
+ pre-configure hook for CMake built with SYSTEM toolchain:
949
+ - remove configure options that link to ncurses static libraries for CMake with system toolchain;
950
+ see also https://github.com/EESSI/software-layer/issues/1175
950
951
"""
951
952
952
953
if self .name == 'CMake' :
953
- if self .toolchain .name == 'system' :
954
- self .log .info ("EESSI hook: unset configopts to build on top of EESSI compatibility layer " )
955
- self .log .info ("https://github.com/EESSI/software-layer/issues/1175 " )
956
- self . log . info ( f"Current configopts before the EESSI custom hook: { self . cfg [ 'configopts' ] } " )
957
- self .cfg ['configopts' ] = ''
958
- self .log .info (f"Updated configopts after the EESSI custom hook : { self .cfg ['configopts' ]} " )
954
+ if is_system_toolchain ( self .toolchain .name ) :
955
+ self .log .info ("Removing configure options that require ncurses static libraries... " )
956
+ self .log .info (f"Original configopts value: { self . cfg [ 'configopts' ] } " )
957
+ regex = re . compile ( "-DCURSES_[A-Z]+_LIBRARY=\$EBROOTNCURSES/lib/lib[a-z]+\.a " )
958
+ self .cfg ['configopts' ] = regex . sub ( self . cfg [ 'configopts' ], '' )
959
+ self .log .info (f"Updated configopts value : { self .cfg ['configopts' ]} " )
959
960
else :
960
961
raise EasyBuildError ("CMake-specific hook triggered for non-CMake easyconfig?!" )
961
962
963
+
962
964
def pre_test_hook (self , * args , ** kwargs ):
963
965
"""Main pre-test hook: trigger custom functions based on software name."""
964
966
if self .name in PRE_TEST_HOOKS :
0 commit comments