ENH: Add support for make test even for fresh build of cmake
This commit is contained in:
parent
74eb17767d
commit
444ba9e442
|
@ -2302,8 +2302,16 @@ void cmLocalUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
|
|||
ctest += "ctest";
|
||||
ctest += cmSystemTools::GetExecutableExtension();
|
||||
}
|
||||
if (cmSystemTools::FileExists(ctest.c_str()))
|
||||
if (!cmSystemTools::FileExists(ctest.c_str()))
|
||||
{
|
||||
if ( !m_Makefile->GetDefinition("PROJECT_NAME") ||
|
||||
strcmp(m_Makefile->GetDefinition("PROJECT_NAME"), "CMake") )
|
||||
{
|
||||
return;
|
||||
}
|
||||
ctest = m_Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH");
|
||||
ctest += "/ctest";
|
||||
}
|
||||
fout << "ARGS=\n";
|
||||
std::string cmd = this->ConvertToOutputForExisting(ctest.c_str());
|
||||
cmd += " $(ARGS)";
|
||||
|
@ -2313,7 +2321,6 @@ void cmLocalUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
|
|||
"",
|
||||
cmd.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
cmLocalUnixMakefileGenerator::
|
||||
|
|
Loading…
Reference in New Issue