diff --git a/easybuild/easyblocks/generic/cmakemake.py b/easybuild/easyblocks/generic/cmakemake.py index f747702fc9f..48cdae593ae 100644 --- a/easybuild/easyblocks/generic/cmakemake.py +++ b/easybuild/easyblocks/generic/cmakemake.py @@ -141,7 +141,10 @@ def build_type(self): def prepend_config_opts(self, config_opts): """Prepends configure options (-Dkey=value) to configopts ignoring those already set""" - cfg_configopts = self.cfg['configopts'] + # need to disable template resolution or it will remain the same for all runs + with self.cfg.disable_templating(): + cfg_configopts = self.cfg['configopts'] + # All options are of the form '-D=' new_opts = ' '.join('-D%s=%s' % (key, value) for key, value in config_opts.items() if '-D%s=' % key not in cfg_configopts)