mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
BUG: Skip a command if its arguments fail to parse
If the arguments to a command fail to parse correctly due to a syntax error, the command should not be invoked. This avoids problems created by processing of commands with bad arguments. Even though the build system will not be generated, the command may affect files on disk that persist across CMake runs.
This commit is contained in:
@@ -64,7 +64,12 @@ public:
|
||||
cmExecutionStatus &status)
|
||||
{
|
||||
std::vector<std::string> expandedArguments;
|
||||
this->Makefile->ExpandArguments(args, expandedArguments);
|
||||
if(!this->Makefile->ExpandArguments(args, expandedArguments))
|
||||
{
|
||||
// There was an error expanding arguments. It was already
|
||||
// reported, so we can skip this command without error.
|
||||
return true;
|
||||
}
|
||||
return this->InitialPass(expandedArguments,status);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user