diff options
author | David Cole <david.cole@kitware.com> | 2011-01-25 23:54:36 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-01-26 00:01:13 (GMT) |
commit | 662756036e4f4983b00ab7740773a55bef808c64 (patch) | |
tree | 187ec92cf99e4c04efa440539b4aa316b7180153 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 0cde56dda4b93a8a51196dbd8c26fdf530a70968 (diff) | |
download | CMake-662756036e4f4983b00ab7740773a55bef808c64.zip CMake-662756036e4f4983b00ab7740773a55bef808c64.tar.gz CMake-662756036e4f4983b00ab7740773a55bef808c64.tar.bz2 |
VS10: Escape double quote chars in defines for rc files (#11695)
To get rc defines to work in the VS10 IDE requires \" when
constructing PreprocessorDefinitions strings. This is different
than defines for cl.
Also, per-file rc defines were not being generated. Fix that, too.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 2d55e1e..4cb745e 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -717,6 +717,10 @@ void cmVisualStudio10TargetGenerator::WriteCLSources() // is ended on a new line this->WriteString("</ClCompile>\n", 2); } + else if(!header && rc && this->OutputSourceSpecificFlags(*source)) + { + this->WriteString("</ResourceCompile>\n", 2); + } else { (*this->BuildFileStream ) << " />\n"; @@ -853,8 +857,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( clOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", ""); clOptions.OutputFlagMap(*this->BuildFileStream, " "); clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, - " ", "\n"); - + " ", "\n", lang); } } return hasFlags; @@ -1120,7 +1123,7 @@ void cmVisualStudio10TargetGenerator::WriteClOptions( } clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", - "\n"); + "\n", "CXX"); this->WriteString("<AssemblerListingLocation>", 3); *this->BuildFileStream << configName << "</AssemblerListingLocation>\n"; @@ -1155,7 +1158,7 @@ WriteRCOptions(std::string const& configName, this->WriteString("<ResourceCompile>\n", 2); Options& clOptions = *(this->ClOptions[configName]); clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", - "\n"); + "\n", "RC"); this->OutputIncludes(includes); this->WriteString("</ResourceCompile>\n", 2); } |