diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2019-03-31 15:35:56 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2019-03-31 21:31:25 (GMT) |
commit | 99698ee351a6ec05ec1436299818e759a58bc0a3 (patch) | |
tree | 0d9cbd1766e0471df3962a6abd94ffb77c7492a2 /Source/cmake.cxx | |
parent | 11475cc5811e6d665cb41fcb1b7f68e6f1cb8af6 (diff) | |
download | CMake-99698ee351a6ec05ec1436299818e759a58bc0a3.zip CMake-99698ee351a6ec05ec1436299818e759a58bc0a3.tar.gz CMake-99698ee351a6ec05ec1436299818e759a58bc0a3.tar.bz2 |
cmake: Fix missed `return` statement when CLI errors found
Diffstat (limited to 'Source/cmake.cxx')
-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 { |