VS: Inherit target-level "-wd" flags in source files (#15284)
If a source file COMPILE_FLAGS option adds "-wd", the .vcxproj file will have a DisableSpecificWarnings setting for the source file. Add to the setting a reference to %(DisableSpecificWarnings) to inherit any such flags set for the whole target.
This commit is contained in:
parent
470c549c62
commit
f545eb0b0b
|
@ -1637,6 +1637,11 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
|
||||||
clOptions.AppendFlag("AdditionalIncludeDirectories",
|
clOptions.AppendFlag("AdditionalIncludeDirectories",
|
||||||
"%(AdditionalIncludeDirectories)");
|
"%(AdditionalIncludeDirectories)");
|
||||||
}
|
}
|
||||||
|
if(clOptions.HasFlag("DisableSpecificWarnings"))
|
||||||
|
{
|
||||||
|
clOptions.AppendFlag("DisableSpecificWarnings",
|
||||||
|
"%(DisableSpecificWarnings)");
|
||||||
|
}
|
||||||
clOptions.AddDefines(configDefines.c_str());
|
clOptions.AddDefines(configDefines.c_str());
|
||||||
clOptions.SetConfiguration((*config).c_str());
|
clOptions.SetConfiguration((*config).c_str());
|
||||||
clOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
|
clOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
|
||||||
|
|
Loading…
Reference in New Issue