summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-01-12 18:30:57 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-01-12 18:30:57 (GMT)
commitb4bf41434c048a47e55302b74ee54f9c097d32ed (patch)
treeb5040c3e336a4082562cac765a2574a6d70f3d33 /Source/cmCTest.cxx
parent002679fdba0e1ea19aca7e7a4303da25ab34df7c (diff)
downloadCMake-b4bf41434c048a47e55302b74ee54f9c097d32ed.zip
CMake-b4bf41434c048a47e55302b74ee54f9c097d32ed.tar.gz
CMake-b4bf41434c048a47e55302b74ee54f9c097d32ed.tar.bz2
ENH: Only look for executable until found
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx110
1 files changed, 55 insertions, 55 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 70c02bd..a985fb3 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -4095,61 +4095,61 @@ int cmCTest::RunCMakeAndTest(std::string* outstring)
else
{
failed.push_back(m_TestCommand);
- }
- std::string tryPath = m_TestCommand;
- tryPath += cmSystemTools::GetExecutableExtension();
- if(cmSystemTools::FileExists(tryPath.c_str()))
- {
- fullPath = cmSystemTools::CollapseFullPath(tryPath.c_str());
- }
- else
- {
- failed.push_back(tryPath);
- }
- // try the Debug extension
- tryPath = m_ConfigType + "/";
- tryPath += cmSystemTools::GetFilenameName(m_TestCommand);
- if(cmSystemTools::FileExists(tryPath.c_str()))
- {
- fullPath = cmSystemTools::CollapseFullPath(tryPath.c_str());
- }
- else
- {
- failed.push_back(tryPath);
- }
- tryPath += cmSystemTools::GetExecutableExtension();
- if(cmSystemTools::FileExists(tryPath.c_str()))
- {
- fullPath = cmSystemTools::CollapseFullPath(tryPath.c_str());
- }
- else
- {
- failed.push_back(tryPath);
- }
- tryPath = m_ExecutableDirectory;
- tryPath += "/";
- tryPath += m_TestCommand;
- tryPath += cmSystemTools::GetExecutableExtension();
- if(cmSystemTools::FileExists(tryPath.c_str()))
- {
- fullPath = cmSystemTools::CollapseFullPath(tryPath.c_str());
- }
- else
- {
- failed.push_back(tryPath);
- }
- tryPath = m_ExecutableDirectory;
- tryPath += "/";
- tryPath += m_ConfigType + "/";
- tryPath += m_TestCommand;
- tryPath += cmSystemTools::GetExecutableExtension();
- if(cmSystemTools::FileExists(tryPath.c_str()))
- {
- fullPath = cmSystemTools::CollapseFullPath(tryPath.c_str());
- }
- else
- {
- failed.push_back(tryPath);
+ std::string tryPath = m_TestCommand;
+ tryPath += cmSystemTools::GetExecutableExtension();
+ if(cmSystemTools::FileExists(tryPath.c_str()))
+ {
+ fullPath = cmSystemTools::CollapseFullPath(tryPath.c_str());
+ }
+ else
+ {
+ failed.push_back(tryPath);
+ // try the Debug extension
+ tryPath = m_ConfigType + "/";
+ tryPath += cmSystemTools::GetFilenameName(m_TestCommand);
+ if(cmSystemTools::FileExists(tryPath.c_str()))
+ {
+ fullPath = cmSystemTools::CollapseFullPath(tryPath.c_str());
+ }
+ else
+ {
+ failed.push_back(tryPath);
+ tryPath += cmSystemTools::GetExecutableExtension();
+ if(cmSystemTools::FileExists(tryPath.c_str()))
+ {
+ fullPath = cmSystemTools::CollapseFullPath(tryPath.c_str());
+ }
+ else
+ {
+ failed.push_back(tryPath);
+ tryPath = m_ExecutableDirectory;
+ tryPath += "/";
+ tryPath += m_TestCommand;
+ tryPath += cmSystemTools::GetExecutableExtension();
+ if(cmSystemTools::FileExists(tryPath.c_str()))
+ {
+ fullPath = cmSystemTools::CollapseFullPath(tryPath.c_str());
+ }
+ else
+ {
+ failed.push_back(tryPath);
+ tryPath = m_ExecutableDirectory;
+ tryPath += "/";
+ tryPath += m_ConfigType + "/";
+ tryPath += m_TestCommand;
+ tryPath += cmSystemTools::GetExecutableExtension();
+ if(cmSystemTools::FileExists(tryPath.c_str()))
+ {
+ fullPath = cmSystemTools::CollapseFullPath(tryPath.c_str());
+ }
+ else
+ {
+ failed.push_back(tryPath);
+ }
+ }
+ }
+ }
+ }
}
if(!cmSystemTools::FileExists(fullPath.c_str()))
{