mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-21 23:38:33 -05:00
ctest: Cleanup for invalid argument handling
Backs out unrelated change and changes error message to 'Unknown argument'
This commit is contained in:
+3
-4
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user