summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmCTest.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 31f1321..bcbe18e 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -477,11 +477,17 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
// Create new "TAG" file or read existing one:
//
+ bool createNewTag = true;
+ if (command)
+ {
+ createNewTag = command->ShouldCreateNewTag();
+ }
+
std::string tagfile = testingDir + "/TAG";
std::ifstream tfin(tagfile.c_str());
std::string tag;
- if (command->ShouldCreateNewTag())
+ if (createNewTag)
{
time_t tctime = time(0);
if ( this->TomorrowTag )