mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-25 10:18:34 -06:00
separate_arguments: Fix crash on *_COMMAND with no arguments
Fixes: #21320
This commit is contained in:
committed by
Brad King
parent
b1d9a25f35
commit
747f80fe82
@@ -80,6 +80,11 @@ bool cmSeparateArgumentsCommand(std::vector<std::string> const& args,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (unparsedArguments.empty()) {
|
||||
status.GetMakefile().AddDefinition(var, {});
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string& command = unparsedArguments.front();
|
||||
|
||||
if (command.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user