diff options
author | Ken Martin <ken.martin@kitware.com> | 2003-12-29 21:27:40 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2003-12-29 21:27:40 (GMT) |
commit | d0bc3b9acdf1e7d1ecc3c6970f97504196c0e87d (patch) | |
tree | 08c8acfaf133c5082ea0ab671907233425bfb7a4 | |
parent | d18c9559b3a3e1b4652516dc6efa03fb63c046f6 (diff) | |
download | CMake-d0bc3b9acdf1e7d1ecc3c6970f97504196c0e87d.zip CMake-d0bc3b9acdf1e7d1ecc3c6970f97504196c0e87d.tar.gz CMake-d0bc3b9acdf1e7d1ecc3c6970f97504196c0e87d.tar.bz2 |
only generate test target when enabled
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.cxx | 19 |
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 |