diff options
author | Brad King <brad.king@kitware.com> | 2015-08-05 17:54:38 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-08-05 17:54:38 (GMT) |
commit | 863b0a8ee9eb7a19226a37edd1d8a398462379a1 (patch) | |
tree | 096ac16ab3bade9f77807a90439742288c1e9632 | |
parent | fccb3e2dae4993650a980799e571bf6ae6e304e6 (diff) | |
parent | 2eee2943cce2a7aea7a11b93f2459f5f333eb84c (diff) | |
download | CMake-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.cxx | 6 |
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. |