mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
set: Improve error message consistency
There are exactly two places that use `ParseResult::AddKeywordError`: the parser itself, and the `set` command. Adjust the format of the message generated by the latter to be consistent with the former.
This commit is contained in:
committed by
Brad King
parent
20e81dbd5e
commit
2ca58c5ac9
@@ -98,8 +98,8 @@ bool cmSetCommand(std::vector<std::string> const& args,
|
||||
{
|
||||
if (!cmState::StringToCacheEntryType(std::string{ type },
|
||||
this->Type)) {
|
||||
this->AddKeywordError("TYPE"_s,
|
||||
cmStrCat("Invalid value: ", type, '.'));
|
||||
this->AddKeywordError(
|
||||
"TYPE"_s, cmStrCat(" invalid value: \""_s, type, "\"\n"_s));
|
||||
}
|
||||
return ArgumentParser::Continue::No;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
CMake Error at CacheWrongTYPE\.cmake:[0-9]+ \(set\):
|
||||
Error after keyword "TYPE":
|
||||
|
||||
Invalid value: FOO\.
|
||||
invalid value: "FOO"
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
Reference in New Issue
Block a user