summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-08-23 15:32:56 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-08-23 15:32:56 (GMT)
commitab0ef5b6a09fd03e340ed81f48a47f5615de7be0 (patch)
tree374127e354a438f0918e967e378c772b6ab79795
parent2190ddc4e931339c7f55f2fe7bbb4038c0a1199a (diff)
downloadCMake-ab0ef5b6a09fd03e340ed81f48a47f5615de7be0.zip
CMake-ab0ef5b6a09fd03e340ed81f48a47f5615de7be0.tar.gz
CMake-ab0ef5b6a09fd03e340ed81f48a47f5615de7be0.tar.bz2
better ctest support
-rw-r--r--Source/cmUnixMakefileGenerator.cxx19
1 files changed, 14 insertions, 5 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx
index 9a878e7..209765b 100644
--- a/Source/cmUnixMakefileGenerator.cxx
+++ b/Source/cmUnixMakefileGenerator.cxx
@@ -1154,11 +1154,6 @@ void cmUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
"cmake.depends ${TARGETS} ${SUBDIR_BUILD} ${CMAKE_COMMAND}",
0);
this->OutputMakeRule(fout,
- "run any tests",
- "test",
- "",
- "ctest");
- this->OutputMakeRule(fout,
"remove generated files",
"clean",
"${SUBDIR_CLEAN}",
@@ -1224,6 +1219,20 @@ void cmUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
0,
"echo \"cmake might be out of date\"");
}
+
+ // find ctest
+ std::string ctest = m_Makefile->GetDefinition("CMAKE_COMMAND");
+ ctest = cmSystemTools::GetFilenamePath(ctest.c_str());
+ ctest += "/";
+ ctest += "ctest";
+ if (cmSystemTools::FileExists(ctest.c_str()))
+ {
+ this->OutputMakeRule(fout,
+ "run any tests",
+ "test",
+ "",
+ ctest.c_str());
+ }
}