summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-06-24 12:57:54 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-06-24 12:57:54 (GMT)
commit78cc9adbd2efd01d934bdadef9852ae2010b4123 (patch)
tree3857fece25685f860345cc9cb2628aa0657771bc /Source
parent2705b1bf736e5f98b0862e831fe9ab2799d1d0ee (diff)
downloadCMake-78cc9adbd2efd01d934bdadef9852ae2010b4123.zip
CMake-78cc9adbd2efd01d934bdadef9852ae2010b4123.tar.gz
CMake-78cc9adbd2efd01d934bdadef9852ae2010b4123.tar.bz2
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.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExecProgramCommand.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx
index 66e0cd6..10de71b 100644
--- a/Source/cmExecProgramCommand.cxx
+++ b/Source/cmExecProgramCommand.cxx
@@ -114,6 +114,10 @@ bool cmExecProgramCommand::InitialPass(std::vector<std::string> const& args)
{
result = cmSystemTools::RunCommand(command.c_str(), output, retVal, 0, verbose);
}
+ if(!result)
+ {
+ retVal = -1;
+ }
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);
}
- return result;
+ return true;
}