summaryrefslogtreecommitdiffstats
path: root/Source/cmTryRunCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-06-21 18:20:30 (GMT)
committerBrad King <brad.king@kitware.com>2005-06-21 18:20:30 (GMT)
commit60b72ab3deb0cd1fa818a4c91c9ce6e519e8413f (patch)
tree18bdc616935a8823f1554ffe81e0425ec6467483 /Source/cmTryRunCommand.cxx
parent9e9b6a8354de56a1db5c642c378b94c2de102e88 (diff)
downloadCMake-60b72ab3deb0cd1fa818a4c91c9ce6e519e8413f.zip
CMake-60b72ab3deb0cd1fa818a4c91c9ce6e519e8413f.tar.gz
CMake-60b72ab3deb0cd1fa818a4c91c9ce6e519e8413f.tar.bz2
BUG: Fixed error message formatting when try run executable command cannot be found.
Diffstat (limited to 'Source/cmTryRunCommand.cxx')
-rw-r--r--Source/cmTryRunCommand.cxx28
1 files changed, 15 insertions, 13 deletions
diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx
index f668ad9..b9d9b4c 100644
--- a/Source/cmTryRunCommand.cxx
+++ b/Source/cmTryRunCommand.cxx
@@ -72,28 +72,30 @@ bool cmTryRunCommand::InitialPass(std::vector<std::string> const& argv)
{
int retVal = -1;
std::string output;
- std::string command;
- command = binaryDirectory;
- command += "/cmTryCompileExec";
- command += cmSystemTools::GetExecutableExtension();
+ std::string command1 = binaryDirectory;
+ command1 += "/cmTryCompileExec";
+ command1 += cmSystemTools::GetExecutableExtension();
std::string fullPath;
- if(cmSystemTools::FileExists(command.c_str()))
+ if(cmSystemTools::FileExists(command1.c_str()))
{
- fullPath = cmSystemTools::CollapseFullPath(command.c_str());
+ fullPath = cmSystemTools::CollapseFullPath(command1.c_str());
}
else
{
- command = binaryDirectory;
- command += "/Debug/cmTryCompileExec";
- command += cmSystemTools::GetExecutableExtension();
- if(cmSystemTools::FileExists(command.c_str()))
+ std::string command2 = binaryDirectory;
+ command2 += "/Debug/cmTryCompileExec";
+ command2 += cmSystemTools::GetExecutableExtension();
+ if(cmSystemTools::FileExists(command2.c_str()))
{
- fullPath = cmSystemTools::CollapseFullPath(command.c_str());
+ fullPath = cmSystemTools::CollapseFullPath(command2.c_str());
}
else
{
- cmSystemTools::Error("Unable to find executable for TRY_RUN",
- command.c_str());
+ cmOStringStream emsg;
+ emsg << "Unable to find executable for TRY_RUN: tried \""
+ << command1 << "\" and \""
+ << command2 << "\".";
+ cmSystemTools::Error(emsg.str().c_str());
}
}
if (fullPath.size() > 1)