diff options
author | Brad King <brad.king@kitware.com> | 2017-03-29 13:14:50 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-03-29 13:14:54 (GMT) |
commit | 6dc7262bf77f551a7f3c36d7ca3023c63ef20af8 (patch) | |
tree | 456a43d8f048f74bfc8de345c0a984c58431d9b4 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 4a6a27ad85a4be666a3bb4260105a54ba1cea0eb (diff) | |
parent | fff34934e70da77c359e47c53ffd04701bcd7611 (diff) | |
download | CMake-6dc7262bf77f551a7f3c36d7ca3023c63ef20af8.zip CMake-6dc7262bf77f551a7f3c36d7ca3023c63ef20af8.tar.gz CMake-6dc7262bf77f551a7f3c36d7ca3023c63ef20af8.tar.bz2 |
Merge topic 'vs-rc-defines'
fff34934 MSVC: Restore _DEBUG preprocessor definition in RC debug builds
79a91538 RC: Add missing CMAKE_RC_FLAGS_<CONFIG> entries to cache
c77194ec VS: Honor preprocessor definitions in RC flags
1449f6f6 cmVisualStudio10TargetGenerator: De-duplicate preprocessor defs
8a619e8c cmIDEOptions: Add GetDefines method
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !640
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 84767a8..9c9296e 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2402,6 +2402,11 @@ bool cmVisualStudio10TargetGenerator::ComputeRcOptions( std::string(this->Makefile->GetSafeDefinition(rcConfigFlagsVar)); rcOptions.Parse(flags.c_str()); + + // For historical reasons, add the C preprocessor defines to RC. + Options& clOptions = *(this->ClOptions[configName]); + rcOptions.AddDefines(clOptions.GetDefines()); + this->RcOptions[configName] = pOptions.release(); return true; } @@ -2414,12 +2419,9 @@ void cmVisualStudio10TargetGenerator::WriteRCOptions( } this->WriteString("<ResourceCompile>\n", 2); - // Preprocessor definitions and includes are shared with clOptions. - Options& clOptions = *(this->ClOptions[configName]); - clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", - "\n", "RC"); - Options& rcOptions = *(this->RcOptions[configName]); + rcOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", + "\n", "RC"); rcOptions.AppendFlag("AdditionalIncludeDirectories", includes); rcOptions.AppendFlag("AdditionalIncludeDirectories", "%(AdditionalIncludeDirectories)"); |