diff options
author | Craig Scott <craig.scott@crascit.com> | 2019-04-01 12:57:02 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-04-01 12:57:13 (GMT) |
commit | c5eb01d4d412610673c85ca1bf8b9d15c168ab5e (patch) | |
tree | bee73b8228a140574d9c8917b6d41b213054ea64 | |
parent | 5ad73b608d4fc7cc6b30017159b800802a503b0c (diff) | |
parent | 99698ee351a6ec05ec1436299818e759a58bc0a3 (diff) | |
download | CMake-c5eb01d4d412610673c85ca1bf8b9d15c168ab5e.zip CMake-c5eb01d4d412610673c85ca1bf8b9d15c168ab5e.tar.gz CMake-c5eb01d4d412610673c85ca1bf8b9d15c168ab5e.tar.bz2 |
Merge topic 'bug/missed-return-on-cli-errors'
99698ee351 cmake: Fix missed `return` statement when CLI errors found
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3171
-rw-r--r-- | Source/cmake.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 8c1a359..fc24ac0 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -710,6 +710,7 @@ void cmake::SetArgs(const std::vector<std::string>& args) this->GraphVizFile = path; if (this->GraphVizFile.empty()) { cmSystemTools::Error("No file specified for --graphviz"); + return; } } else if (arg.find("--debug-trycompile", 0) == 0) { std::cout << "debug trycompile on\n"; @@ -797,9 +798,9 @@ void cmake::SetArgs(const std::vector<std::string>& args) cmSystemTools::Error("Could not create named generator " + value + kdevError); this->PrintGeneratorList(); - } else { - this->SetGlobalGenerator(gen); + return; } + this->SetGlobalGenerator(gen); } // no option assume it is the path to the source or an existing build else { |