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
10 changes: 9 additions & 1 deletion easybuild/easyblocks/generic/cmakemake.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def extra_options(extra_vars=None):
'configure_cmd': [DEFAULT_CONFIGURE_CMD, "Configure command to use", CUSTOM],
'generator': [None, "Build file generator to use. None to use CMakes default", CUSTOM],
'install_target_subdir': [None, "Subdirectory to use as installation target", CUSTOM],
'install_libdir': ['lib', "Subdirectory to use for library installation files", CUSTOM],
'runtest': [None, "Make target to test build or True to use CTest", BUILD],
'srcdir': [None, "Source directory location to provide to cmake command", CUSTOM],
'separate_build_dir': [True, "Perform build in a separate directory", CUSTOM],
Expand Down Expand Up @@ -201,10 +202,17 @@ def configure_step(self, srcdir=None, builddir=None):

if '-DCMAKE_BUILD_TYPE=' in self.cfg['configopts']:
if self.cfg.get('build_type') is not None:
self.log.warning('CMAKE_BUILD_TYPE is set in configopts. Ignoring build_type')
self.log.warning("CMAKE_BUILD_TYPE is set in configopts. Ignoring 'build_type' easyconfig parameter.")
else:
options['CMAKE_BUILD_TYPE'] = self.build_type

if '-DCMAKE_INSTALL_LIBDIR=' in self.cfg['configopts']:
self.log.warning(
"CMAKE_INSTALL_LIBDIR is set in configopts. Ignoring 'install_libdir' easyconfig parameter."
)
else:
options['CMAKE_INSTALL_LIBDIR'] = self.cfg['install_libdir']

# Add -fPIC flag if necessary
if self.toolchain.options['pic']:
options['CMAKE_POSITION_INDEPENDENT_CODE'] = 'ON'
Expand Down