BUG: exec program should not fail if it can not exec the program, but should only set the return value to -1 and set the output to the reason for the failure.
This commit is contained in:
parent
2705b1bf73
commit
78cc9adbd2
@ -114,6 +114,10 @@ bool cmExecProgramCommand::InitialPass(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
result = cmSystemTools::RunCommand(command.c_str(), output, retVal, 0, verbose);
|
result = cmSystemTools::RunCommand(command.c_str(), output, retVal, 0, verbose);
|
||||||
}
|
}
|
||||||
|
if(!result)
|
||||||
|
{
|
||||||
|
retVal = -1;
|
||||||
|
}
|
||||||
|
|
||||||
if ( output_variable.size() > 0 )
|
if ( output_variable.size() > 0 )
|
||||||
{
|
{
|
||||||
@ -139,6 +143,6 @@ bool cmExecProgramCommand::InitialPass(std::vector<std::string> const& args)
|
|||||||
m_Makefile->AddDefinition(return_variable.c_str(), buffer);
|
m_Makefile->AddDefinition(return_variable.c_str(), buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user