Add generator expression support to per-source COMPILE_DEFINITIONS

This allows users to specify different genex-based compile definitions for each file in a target.

Fixes: #17508
This commit is contained in:
Marc Chevrier
2017-11-30 15:06:21 +01:00
parent d06b826421
commit 9432f686e6
16 changed files with 103 additions and 28 deletions
+3 -3
View File
@@ -1484,13 +1484,13 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo(
}
}
if (const char* cdefs = sf.GetProperty("COMPILE_DEFINITIONS")) {
fc.CompileDefs = cdefs;
fc.CompileDefs = genexInterpreter.Evaluate(cdefs);
needfc = true;
}
std::string defPropName = "COMPILE_DEFINITIONS_";
defPropName += configUpper;
if (const char* ccdefs = sf.GetProperty(defPropName.c_str())) {
fc.CompileDefsConfig = ccdefs;
if (const char* ccdefs = sf.GetProperty(defPropName)) {
fc.CompileDefsConfig = genexInterpreter.Evaluate(ccdefs);
needfc = true;
}