diff options
author | Zack Galbreath <zack.galbreath@kitware.com> | 2019-04-30 20:12:02 (GMT) |
---|---|---|
committer | Zack Galbreath <zack.galbreath@kitware.com> | 2019-05-07 14:45:47 (GMT) |
commit | 2a34d0ac3613101996b4e751bc2653e4cbeaf5b0 (patch) | |
tree | 7b1e9f211a1f5fd33f7950058968c08cc6544f68 /Source/CTest/cmCTestVC.cxx | |
parent | 7ddac9512188d1dbfcac76b24957956a197370ad (diff) | |
download | CMake-2a34d0ac3613101996b4e751bc2653e4cbeaf5b0.zip CMake-2a34d0ac3613101996b4e751bc2653e4cbeaf5b0.tar.gz CMake-2a34d0ac3613101996b4e751bc2653e4cbeaf5b0.tar.bz2 |
ctest: Add new variable CTEST_UPDATE_VERSION_OVERRIDE
Set this in a CTest script to explicitly define what the current revision
will be reported as in Update.xml.
Diffstat (limited to 'Source/CTest/cmCTestVC.cxx')
-rw-r--r-- | Source/CTest/cmCTestVC.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestVC.cxx b/Source/CTest/cmCTestVC.cxx index 374e73f..eea41cf 100644 --- a/Source/CTest/cmCTestVC.cxx +++ b/Source/CTest/cmCTestVC.cxx @@ -141,6 +141,15 @@ void cmCTestVC::CleanupImpl() bool cmCTestVC::Update() { bool result = true; + + // Use the explicitly specified version. + std::string versionOverride = + this->CTest->GetCTestConfiguration("UpdateVersionOverride"); + if (!versionOverride.empty()) { + this->SetNewRevision(versionOverride); + return true; + } + // if update version only is on then do not actually update, // just note the current version and finish if (!cmSystemTools::IsOn( @@ -166,6 +175,11 @@ bool cmCTestVC::NoteNewRevision() return true; } +void cmCTestVC::SetNewRevision(std::string const& /*unused*/) +{ + // We do nothing by default. +} + bool cmCTestVC::UpdateImpl() { cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, |