better ctest support
This commit is contained in:
parent
2190ddc4e9
commit
ab0ef5b6a0
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue