mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 13:19:51 -05:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user