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