summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudioGeneratorOptions.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-01-25 23:54:36 (GMT)
committerDavid Cole <david.cole@kitware.com>2011-01-26 00:01:13 (GMT)
commit662756036e4f4983b00ab7740773a55bef808c64 (patch)
tree187ec92cf99e4c04efa440539b4aa316b7180153 /Source/cmVisualStudioGeneratorOptions.cxx
parent0cde56dda4b93a8a51196dbd8c26fdf530a70968 (diff)
downloadCMake-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/cmVisualStudioGeneratorOptions.cxx')
-rw-r--r--Source/cmVisualStudioGeneratorOptions.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx
index 9acae0d..ed0d60c 100644
--- a/Source/cmVisualStudioGeneratorOptions.cxx
+++ b/Source/cmVisualStudioGeneratorOptions.cxx
@@ -204,7 +204,8 @@ void
cmVisualStudioGeneratorOptions
::OutputPreprocessorDefinitions(std::ostream& fout,
const char* prefix,
- const char* suffix)
+ const char* suffix,
+ const char* lang)
{
if(this->Defines.empty())
{
@@ -251,6 +252,11 @@ cmVisualStudioGeneratorOptions
if(this->Version == 10)
{
define = cmVisualStudio10GeneratorOptionsEscapeForXML(define.c_str());
+
+ if(0 == strcmp(lang, "RC"))
+ {
+ cmSystemTools::ReplaceString(define, "\"", "\\\"");
+ }
}
else
{