summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-12-08 00:11:28 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-12-08 00:11:28 (GMT)
commit29ef6452729e38e254a98889642a27b1239b6b1e (patch)
tree3f2900929e7aec72239746d67a9c6bc35d1463ec /Source
parentb0f3a17450f5a8dd5b3021bf237044747a09bc63 (diff)
downloadCMake-29ef6452729e38e254a98889642a27b1239b6b1e.zip
CMake-29ef6452729e38e254a98889642a27b1239b6b1e.tar.gz
CMake-29ef6452729e38e254a98889642a27b1239b6b1e.tar.bz2
BUG: executable extension wrong for ctest search, and was not looking in Debug and Release
Diffstat (limited to 'Source')
-rw-r--r--Source/cmUnixMakefileGenerator.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx
index 5c5f44f..8e1a2f1 100644
--- a/Source/cmUnixMakefileGenerator.cxx
+++ b/Source/cmUnixMakefileGenerator.cxx
@@ -1529,7 +1529,23 @@ void cmUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
ctest = cmSystemTools::GetFilenamePath(ctest.c_str());
ctest += "/";
ctest += "ctest";
- ctest += m_ExecutableExtension;
+ ctest += cmSystemTools::GetExecutableExtension();
+ if(!cmSystemTools::FileExists(ctest.c_str()))
+ {
+ ctest = m_Makefile->GetDefinition("CMAKE_COMMAND");
+ ctest = cmSystemTools::GetFilenamePath(ctest.c_str());
+ ctest += "/Debug/";
+ ctest += "ctest";
+ ctest += cmSystemTools::GetExecutableExtension();
+ }
+ if(!cmSystemTools::FileExists(ctest.c_str()))
+ {
+ ctest = m_Makefile->GetDefinition("CMAKE_COMMAND");
+ ctest = cmSystemTools::GetFilenamePath(ctest.c_str());
+ ctest += "/Release/";
+ ctest += "ctest";
+ ctest += cmSystemTools::GetExecutableExtension();
+ }
if (cmSystemTools::FileExists(ctest.c_str()))
{
this->OutputMakeRule(fout,