summaryrefslogtreecommitdiffstats
path: root/Source/cmUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmUnixMakefileGenerator.cxx')
-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,