|
@@ -2066,12 +2066,15 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
|
|
|
std::string flags;
|
|
std::string flags;
|
|
|
bool configDependentFlags = false;
|
|
bool configDependentFlags = false;
|
|
|
std::string defines;
|
|
std::string defines;
|
|
|
|
|
+ bool configDependentDefines = false;
|
|
|
if (const char* cflags = sf.GetProperty("COMPILE_FLAGS")) {
|
|
if (const char* cflags = sf.GetProperty("COMPILE_FLAGS")) {
|
|
|
configDependentFlags =
|
|
configDependentFlags =
|
|
|
cmGeneratorExpression::Find(cflags) != std::string::npos;
|
|
cmGeneratorExpression::Find(cflags) != std::string::npos;
|
|
|
flags += cflags;
|
|
flags += cflags;
|
|
|
}
|
|
}
|
|
|
if (const char* cdefs = sf.GetProperty("COMPILE_DEFINITIONS")) {
|
|
if (const char* cdefs = sf.GetProperty("COMPILE_DEFINITIONS")) {
|
|
|
|
|
+ configDependentDefines =
|
|
|
|
|
+ cmGeneratorExpression::Find(cdefs) != std::string::npos;
|
|
|
defines += cdefs;
|
|
defines += cdefs;
|
|
|
}
|
|
}
|
|
|
std::string lang =
|
|
std::string lang =
|
|
@@ -2121,6 +2124,8 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
|
|
|
if (!configDefines.empty()) {
|
|
if (!configDefines.empty()) {
|
|
|
configDefines += ";";
|
|
configDefines += ";";
|
|
|
}
|
|
}
|
|
|
|
|
+ configDependentDefines |=
|
|
|
|
|
+ cmGeneratorExpression::Find(ccdefs) != std::string::npos;
|
|
|
configDefines += ccdefs;
|
|
configDefines += ccdefs;
|
|
|
}
|
|
}
|
|
|
// if we have flags or defines for this config then
|
|
// if we have flags or defines for this config then
|
|
@@ -2170,7 +2175,11 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
|
|
|
clOptions.AppendFlag("DisableSpecificWarnings",
|
|
clOptions.AppendFlag("DisableSpecificWarnings",
|
|
|
"%(DisableSpecificWarnings)");
|
|
"%(DisableSpecificWarnings)");
|
|
|
}
|
|
}
|
|
|
- clOptions.AddDefines(configDefines.c_str());
|
|
|
|
|
|
|
+ if (configDependentDefines) {
|
|
|
|
|
+ clOptions.AddDefines(genexInterpreter.Evaluate(configDefines));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ clOptions.AddDefines(configDefines.c_str());
|
|
|
|
|
+ }
|
|
|
clOptions.SetConfiguration((*config).c_str());
|
|
clOptions.SetConfiguration((*config).c_str());
|
|
|
clOptions.PrependInheritedString("AdditionalOptions");
|
|
clOptions.PrependInheritedString("AdditionalOptions");
|
|
|
clOptions.OutputFlagMap(*this->BuildFileStream, " ");
|
|
clOptions.OutputFlagMap(*this->BuildFileStream, " ");
|