summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator.cxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx
index e05ff42..08b0177 100644
--- a/Source/cmLocalUnixMakefileGenerator.cxx
+++ b/Source/cmLocalUnixMakefileGenerator.cxx
@@ -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