mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 12:49:36 -06:00
find_*: Improve error message quoting consistency
Some error messages (Windows registry related) of the `find_xxx` and `cmake_host_system_information` commands, reported keywords in quotes, while most commands did not.
This commit is contained in:
@@ -604,14 +604,14 @@ bool QueryWindowsRegistry(Range args, cmExecutionStatus& status,
|
||||
(arguments.ValueNames || arguments.SubKeys)) ||
|
||||
(arguments.ValueName.empty() && arguments.ValueNames &&
|
||||
arguments.SubKeys)) {
|
||||
status.SetError("given mutually exclusive sub-options \"VALUE\", "
|
||||
"\"VALUE_NAMES\" or \"SUBKEYS\".");
|
||||
status.SetError("given mutually exclusive sub-options VALUE, "
|
||||
"VALUE_NAMES or SUBKEYS.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!arguments.View.empty() && !cmWindowsRegistry::ToView(arguments.View)) {
|
||||
status.SetError(
|
||||
cmStrCat("given invalid value for \"VIEW\": ", arguments.View, '.'));
|
||||
cmStrCat("given invalid value for VIEW: ", arguments.View, '.'));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)
|
||||
newStyle = true;
|
||||
} else if (args[j] == "REGISTRY_VIEW") {
|
||||
if (++j == args.size()) {
|
||||
this->SetError("missing required argument for \"REGISTRY_VIEW\"");
|
||||
this->SetError("missing required argument for REGISTRY_VIEW");
|
||||
return false;
|
||||
}
|
||||
auto view = cmWindowsRegistry::ToView(args[j]);
|
||||
@@ -141,18 +141,18 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)
|
||||
this->RegistryView = *view;
|
||||
} else {
|
||||
this->SetError(
|
||||
cmStrCat("given invalid value for \"REGISTRY_VIEW\": ", args[j]));
|
||||
cmStrCat("given invalid value for REGISTRY_VIEW: ", args[j]));
|
||||
return false;
|
||||
}
|
||||
} else if (args[j] == "VALIDATOR") {
|
||||
if (++j == args.size()) {
|
||||
this->SetError("missing required argument for \"VALIDATOR\"");
|
||||
this->SetError("missing required argument for VALIDATOR");
|
||||
return false;
|
||||
}
|
||||
auto command = this->Makefile->GetState()->GetCommand(args[j]);
|
||||
if (!command) {
|
||||
this->SetError(cmStrCat(
|
||||
"command specified for \"VALIDATOR\" is undefined: ", args[j], '.'));
|
||||
"command specified for VALIDATOR is undefined: ", args[j], '.'));
|
||||
return false;
|
||||
}
|
||||
// ensure a macro is not specified as validator
|
||||
@@ -164,7 +164,7 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)
|
||||
item.c_str()) == 0;
|
||||
}) != macros.end()) {
|
||||
this->SetError(cmStrCat(
|
||||
"command specified for \"VALIDATOR\" is not a function: ", args[j],
|
||||
"command specified for VALIDATOR is not a function: ", args[j],
|
||||
'.'));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -754,7 +754,7 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
|
||||
doing = DoingNone;
|
||||
} else if (args[i] == "REGISTRY_VIEW") {
|
||||
if (++i == args.size()) {
|
||||
this->SetError("missing required argument for \"REGISTRY_VIEW\"");
|
||||
this->SetError("missing required argument for REGISTRY_VIEW");
|
||||
return false;
|
||||
}
|
||||
auto view = cmWindowsRegistry::ToView(args[i]);
|
||||
@@ -763,7 +763,7 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
|
||||
this->RegistryViewDefined = true;
|
||||
} else {
|
||||
this->SetError(
|
||||
cmStrCat("given invalid value for \"REGISTRY_VIEW\": ", args[i]));
|
||||
cmStrCat("given invalid value for REGISTRY_VIEW: ", args[i]));
|
||||
return false;
|
||||
}
|
||||
} else if (this->CheckCommonArgument(args[i])) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at Registry_BadView2.cmake:[0-9]+ \(cmake_host_system_information\):
|
||||
cmake_host_system_information given invalid value for "VIEW": BAD_VIEW.
|
||||
cmake_host_system_information given invalid value for VIEW: BAD_VIEW.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at REGISTRY_VIEW-no-view.cmake:[0-9]+ \(find_file\):
|
||||
find_file missing required argument for "REGISTRY_VIEW"
|
||||
find_file missing required argument for REGISTRY_VIEW
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at REGISTRY_VIEW-wrong-view.cmake:[0-9]+ \(find_file\):
|
||||
find_file given invalid value for "REGISTRY_VIEW": WRONG_VIEW
|
||||
find_file given invalid value for REGISTRY_VIEW: WRONG_VIEW
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at VALIDATOR-no-function.cmake:[0-9]+ \(find_file\):
|
||||
find_file missing required argument for "VALIDATOR"
|
||||
find_file missing required argument for VALIDATOR
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at VALIDATOR-specify-macro.cmake:[0-9]+ \(find_file\):
|
||||
find_file command specified for "VALIDATOR" is not a function: check.
|
||||
find_file command specified for VALIDATOR is not a function: check.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at VALIDATOR-undefined-function.cmake:[0-9]+ \(find_file\):
|
||||
find_file command specified for "VALIDATOR" is undefined: undefined.
|
||||
find_file command specified for VALIDATOR is undefined: undefined.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at REGISTRY_VIEW-no-view.cmake:[0-9]+ \(find_library\):
|
||||
find_library missing required argument for "REGISTRY_VIEW"
|
||||
find_library missing required argument for REGISTRY_VIEW
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at REGISTRY_VIEW-wrong-view.cmake:[0-9]+ \(find_library\):
|
||||
find_library given invalid value for "REGISTRY_VIEW": WRONG_VIEW
|
||||
find_library given invalid value for REGISTRY_VIEW: WRONG_VIEW
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at VALIDATOR-no-function.cmake:[0-9]+ \(find_library\):
|
||||
find_library missing required argument for "VALIDATOR"
|
||||
find_library missing required argument for VALIDATOR
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at VALIDATOR-specify-macro.cmake:[0-9]+ \(find_library\):
|
||||
find_library command specified for "VALIDATOR" is not a function: check.
|
||||
find_library command specified for VALIDATOR is not a function: check.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at VALIDATOR-undefined-function.cmake:[0-9]+ \(find_library\):
|
||||
find_library command specified for "VALIDATOR" is undefined: undefined.
|
||||
find_library command specified for VALIDATOR is undefined: undefined.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at REGISTRY_VIEW-no-view.cmake:[0-9]+ \(find_package\):
|
||||
find_package missing required argument for "REGISTRY_VIEW"
|
||||
find_package missing required argument for REGISTRY_VIEW
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at REGISTRY_VIEW-wrong-view.cmake:[0-9]+ \(find_package\):
|
||||
find_package given invalid value for "REGISTRY_VIEW": WRONG_VIEW
|
||||
find_package given invalid value for REGISTRY_VIEW: WRONG_VIEW
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at REGISTRY_VIEW-no-view.cmake:[0-9]+ \(find_path\):
|
||||
find_path missing required argument for "REGISTRY_VIEW"
|
||||
find_path missing required argument for REGISTRY_VIEW
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at REGISTRY_VIEW-wrong-view.cmake:[0-9]+ \(find_path\):
|
||||
find_path given invalid value for "REGISTRY_VIEW": WRONG_VIEW
|
||||
find_path given invalid value for REGISTRY_VIEW: WRONG_VIEW
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at VALIDATOR-no-function.cmake:[0-9]+ \(find_path\):
|
||||
find_path missing required argument for "VALIDATOR"
|
||||
find_path missing required argument for VALIDATOR
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at VALIDATOR-specify-macro.cmake:[0-9]+ \(find_path\):
|
||||
find_path command specified for "VALIDATOR" is not a function: check.
|
||||
find_path command specified for VALIDATOR is not a function: check.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at VALIDATOR-undefined-function.cmake:[0-9]+ \(find_path\):
|
||||
find_path command specified for "VALIDATOR" is undefined: undefined.
|
||||
find_path command specified for VALIDATOR is undefined: undefined.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at REGISTRY_VIEW-no-view.cmake:[0-9]+ \(find_program\):
|
||||
find_program missing required argument for "REGISTRY_VIEW"
|
||||
find_program missing required argument for REGISTRY_VIEW
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at REGISTRY_VIEW-wrong-view.cmake:[0-9]+ \(find_program\):
|
||||
find_program given invalid value for "REGISTRY_VIEW": WRONG_VIEW
|
||||
find_program given invalid value for REGISTRY_VIEW: WRONG_VIEW
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at VALIDATOR-no-function.cmake:[0-9]+ \(find_program\):
|
||||
find_program missing required argument for "VALIDATOR"
|
||||
find_program missing required argument for VALIDATOR
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at VALIDATOR-specify-macro.cmake:[0-9]+ \(find_program\):
|
||||
find_program command specified for "VALIDATOR" is not a function: check.
|
||||
find_program command specified for VALIDATOR is not a function: check.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at VALIDATOR-undefined-function.cmake:[0-9]+ \(find_program\):
|
||||
find_program command specified for "VALIDATOR" is undefined: undefined.
|
||||
find_program command specified for VALIDATOR is undefined: undefined.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
|
||||
Reference in New Issue
Block a user