better ctest support

This commit is contained in:
Ken Martin 2001-08-23 11:32:56 -04:00
parent 2190ddc4e9
commit ab0ef5b6a0
1 changed files with 14 additions and 5 deletions

View File

@ -1153,11 +1153,6 @@ void cmUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
"all",
"cmake.depends ${TARGETS} ${SUBDIR_BUILD} ${CMAKE_COMMAND}",
0);
this->OutputMakeRule(fout,
"run any tests",
"test",
"",
"ctest");
this->OutputMakeRule(fout,
"remove generated files",
"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());
}
}