mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-13 12:59:55 -05:00
only generate test target when enabled
This commit is contained in:
@@ -2669,14 +2669,17 @@ void cmLocalUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
|
||||
ctest = m_Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH");
|
||||
ctest += "/ctest";
|
||||
}
|
||||
fout << "ARGS=\n";
|
||||
std::string cmd = this->ConvertToOutputForExisting(ctest.c_str());
|
||||
cmd += " $(ARGS)";
|
||||
this->OutputMakeRule(fout,
|
||||
"tests",
|
||||
"test",
|
||||
"",
|
||||
cmd.c_str());
|
||||
if (m_Makefile->IsOn("CMAKE_TESTING_ENABLED"))
|
||||
{
|
||||
fout << "ARGS=\n";
|
||||
std::string cmd = this->ConvertToOutputForExisting(ctest.c_str());
|
||||
cmd += " $(ARGS)";
|
||||
this->OutputMakeRule(fout,
|
||||
"tests",
|
||||
"test",
|
||||
"",
|
||||
cmd.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user