summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-08-05 17:54:38 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-08-05 17:54:38 (GMT)
commit863b0a8ee9eb7a19226a37edd1d8a398462379a1 (patch)
tree096ac16ab3bade9f77807a90439742288c1e9632
parentfccb3e2dae4993650a980799e571bf6ae6e304e6 (diff)
parent2eee2943cce2a7aea7a11b93f2459f5f333eb84c (diff)
downloadCMake-863b0a8ee9eb7a19226a37edd1d8a398462379a1.zip
CMake-863b0a8ee9eb7a19226a37edd1d8a398462379a1.tar.gz
CMake-863b0a8ee9eb7a19226a37edd1d8a398462379a1.tar.bz2
Merge topic 'xcode-improve-quoting'
2eee2943 Xcode: Invert quoting logic to whitelist of characters
-rw-r--r--Source/cmXCodeObject.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index ba6e395..c59c360 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -243,7 +243,11 @@ void cmXCodeObject::PrintString(std::ostream& os,std::string String)
bool needQuote =
(String.empty() ||
String.find("//") != String.npos ||
- String.find_first_of(" <>+-*=@[](){},~") != String.npos);
+ String.find_first_not_of(
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "abcdefghijklmnopqrstuvwxyz"
+ "0123456789"
+ "$_./") != String.npos);
const char* quote = needQuote? "\"" : "";
// Print the string, quoted and escaped as necessary.