Merge topic 'vs10-preprocessor-semicolons'

4e4688e VS 10: Escape ; as %3B in preprocessor definitions (#14073)
This commit is contained in:
Brad King 2013-05-16 14:36:19 -04:00 committed by CMake Topic Stage
commit 9cdb5c0b54
3 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@
"in a (configured) header file. Then report the limitation. " \ "in a (configured) header file. Then report the limitation. " \
"Known limitations include:\n" \ "Known limitations include:\n" \
" # - broken almost everywhere\n" \ " # - broken almost everywhere\n" \
" ; - broken in VS IDE and Borland Makefiles\n" \ " ; - broken in VS IDE 7.0 and Borland Makefiles\n" \
" , - broken in VS IDE\n" \ " , - broken in VS IDE\n" \
" % - broken in some cases in NMake\n" \ " % - broken in some cases in NMake\n" \
" & | - broken in some cases on MinGW\n" \ " & | - broken in some cases on MinGW\n" \

View File

@ -6,6 +6,7 @@
inline std::string cmVisualStudio10GeneratorOptionsEscapeForXML(const char* s) inline std::string cmVisualStudio10GeneratorOptionsEscapeForXML(const char* s)
{ {
std::string ret = s; std::string ret = s;
cmSystemTools::ReplaceString(ret, ";", "%3B");
cmSystemTools::ReplaceString(ret, "&", "&"); cmSystemTools::ReplaceString(ret, "&", "&");
cmSystemTools::ReplaceString(ret, "<", "&lt;"); cmSystemTools::ReplaceString(ret, "<", "&lt;");
cmSystemTools::ReplaceString(ret, ">", "&gt;"); cmSystemTools::ReplaceString(ret, ">", "&gt;");

View File

@ -55,7 +55,7 @@ endif()
# must not have it escaped inside the configured header. # must not have it escaped inside the configured header.
set(STRING_EXTRA "") set(STRING_EXTRA "")
if(NOT BORLAND AND NOT PP_VS70 AND NOT PP_VS100 AND NOT PP_VS110) if(NOT BORLAND AND NOT PP_VS70)
# Borland, VS70 IDE: ; # Borland, VS70 IDE: ;
# The Borland compiler will simply not accept a non-escaped semicolon # The Borland compiler will simply not accept a non-escaped semicolon
# on the command line. If it is escaped \; then the escape character # on the command line. If it is escaped \; then the escape character
@ -63,7 +63,6 @@ if(NOT BORLAND AND NOT PP_VS70 AND NOT PP_VS100 AND NOT PP_VS110)
# #
# The VS 7.0 IDE separates definitions on semicolons and commas with # The VS 7.0 IDE separates definitions on semicolons and commas with
# no regard for quotes. Fortunately VS 7.1 and above are okay. # no regard for quotes. Fortunately VS 7.1 and above are okay.
# VS 10 seems to also not like semicolons
set(SEMICOLON "\;") set(SEMICOLON "\;")
endif() endif()