diff options
author | Brad King <brad.king@kitware.com> | 2014-12-04 20:32:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-12-04 20:40:04 (GMT) |
commit | f545eb0b0b00cb02f540636549f63189f43b4870 (patch) | |
tree | 3761dc7b0323cdf2d7d41cc0e9ae418f463ec98a /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 470c549c622ddddd0be3ae63945e40a1cad85923 (diff) | |
download | CMake-f545eb0b0b00cb02f540636549f63189f43b4870.zip CMake-f545eb0b0b00cb02f540636549f63189f43b4870.tar.gz CMake-f545eb0b0b00cb02f540636549f63189f43b4870.tar.bz2 |
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.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 68b6576..f903bdb 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -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, " ", ""); |