summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-29 13:26:12 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-10-29 13:29:34 (GMT)
commit4eb77958d208c338c9bfcc32857531eaed78ee73 (patch)
tree8d8342322729e074f94828beced93bf37adbe238 /Source
parent0f84db3af4403211de9371491d1ad8182969db49 (diff)
parent379e5f93a9307eb77cf35052e83853939573ae44 (diff)
downloadCMake-4eb77958d208c338c9bfcc32857531eaed78ee73.zip
CMake-4eb77958d208c338c9bfcc32857531eaed78ee73.tar.gz
CMake-4eb77958d208c338c9bfcc32857531eaed78ee73.tar.bz2
Merge topic 'minusCparse'
379e5f93a9 Tests: Add cases for -{C,D,U} without a source tree 5873815fef cmake: distinguish '-Cpath' from '-C path' in source dir parsing Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2517
Diffstat (limited to 'Source')
-rw-r--r--Source/cmake.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 889a5fb..1aff5eb 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -676,10 +676,25 @@ void cmake::SetArgs(const std::vector<std::string>& args,
#endif
else if (arg.find("-D", 0) == 0) {
// skip for now
+ // in case '-D var=val' is given, also skip the next
+ // in case '-Dvar=val' is given, don't skip the next
+ if (arg.size() == 2) {
+ ++i;
+ }
} else if (arg.find("-U", 0) == 0) {
// skip for now
+ // in case '-U var' is given, also skip the next
+ // in case '-Uvar' is given, don't skip the next
+ if (arg.size() == 2) {
+ ++i;
+ }
} else if (arg.find("-C", 0) == 0) {
// skip for now
+ // in case '-C path' is given, also skip the next
+ // in case '-Cpath' is given, don't skip the next
+ if (arg.size() == 2) {
+ ++i;
+ }
} else if (arg.find("-P", 0) == 0) {
// skip for now
i++;