diff options
-rw-r--r-- | Source/cmCTest.cxx | 7 | ||||
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/invalid-ctest-argument-stderr.txt | 3 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 29bf311..498fd6e 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -760,9 +760,7 @@ bool cmCTest::UpdateCTestConfiguration() } if (!this->GetCTestConfiguration("BuildDirectory").empty()) { this->Impl->BinaryDir = this->GetCTestConfiguration("BuildDirectory"); - if (this->Impl->TestDir.empty()) { - cmSystemTools::ChangeDirectory(this->Impl->BinaryDir); - } + cmSystemTools::ChangeDirectory(this->Impl->BinaryDir); } this->Impl->TimeOut = std::chrono::seconds(atoi(this->GetCTestConfiguration("TimeOut").c_str())); @@ -2830,7 +2828,8 @@ int cmCTest::Run(std::vector<std::string>& args, std::string* output) if (!validArg && cmHasLiteralPrefix(arg, "-") && !cmHasLiteralPrefix(arg, "--preset")) { - cmSystemTools::Error(cmStrCat("Invalid argument: ", arg)); + cmSystemTools::Error(cmStrCat("Unknown argument: ", arg)); + cmSystemTools::Error("Run 'ctest --help' for all supported options."); return 1; } } // the close of the for argument loop diff --git a/Tests/RunCMake/CTestCommandLine/invalid-ctest-argument-stderr.txt b/Tests/RunCMake/CTestCommandLine/invalid-ctest-argument-stderr.txt index 4de2e77..3304a26 100644 --- a/Tests/RunCMake/CTestCommandLine/invalid-ctest-argument-stderr.txt +++ b/Tests/RunCMake/CTestCommandLine/invalid-ctest-argument-stderr.txt @@ -1 +1,2 @@ -CMake Error: Invalid argument: --not-a-valid-ctest-argument +CMake Error: Unknown argument: --not-a-valid-ctest-argument +CMake Error: Run 'ctest --help' for all supported options. |