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:
Brad King 2014-12-04 15:32:32 -05:00
parent 470c549c62
commit f545eb0b0b
1 changed files with 5 additions and 0 deletions

View File

@ -1637,6 +1637,11 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
clOptions.AppendFlag("AdditionalIncludeDirectories",
"%(AdditionalIncludeDirectories)");
}
if(clOptions.HasFlag("DisableSpecificWarnings"))
{
clOptions.AppendFlag("DisableSpecificWarnings",
"%(DisableSpecificWarnings)");
}
clOptions.AddDefines(configDefines.c_str());
clOptions.SetConfiguration((*config).c_str());
clOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");