summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-07-27 19:46:21 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-07-27 19:46:21 (GMT)
commitde217bee8d77a4287efe81731311d0cf3c89c2c8 (patch)
tree71ec0ea0a63e4272772c0b3364220aaadb69ae4b
parentf9aef0e422b7e308d48bb409c435cc78739c4804 (diff)
downloadCMake-de217bee8d77a4287efe81731311d0cf3c89c2c8.zip
CMake-de217bee8d77a4287efe81731311d0cf3c89c2c8.tar.gz
CMake-de217bee8d77a4287efe81731311d0cf3c89c2c8.tar.bz2
BUG: Generate RUN_TEST target if any tests are there
-rw-r--r--Source/cmGlobalGenerator.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index dea33eb..97e0564 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1058,9 +1058,17 @@ void cmGlobalGenerator::SetupTests()
{
fname += "DartTestfile.txt";
}
-
+
+ // Add run_test only if any tests are foun
+ long total_tests = 0;
+ unsigned int i;
+ for (i = 0; i < m_LocalGenerators.size(); ++i)
+ {
+ total_tests += m_LocalGenerators[i]->GetMakefile()->GetTests()->size();
+ }
+
// If the file doesn't exist, then ENABLE_TESTING hasn't been run
- if (cmSystemTools::FileExists(fname.c_str()))
+ if (total_tests > 0)
{
const char* no_output = 0;
std::vector<std::string> no_depends;