diff options
-rw-r--r-- | Source/cmCTest.cxx | 14 | ||||
-rw-r--r-- | Source/cmCTest.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 4080811..302ba52 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2148,6 +2148,20 @@ void cmCTest::PopulateCustomVector(cmMakefile* mf, const char* def, tm_VectorOfS } } +void cmCTest::PopulateCustomInteger(cmMakefile* mf, const char* def, int& val) +{ + if ( !def) + { + return; + } + const char* dval = mf->GetDefinition(def); + if ( !dval ) + { + return; + } + val = atoi(dval); +} + std::string cmCTest::GetShortPathToFile(const char* cfname) { const std::string& sourceDir = GetDartConfiguration("SourceDirectory"); diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 2039350..2fdb033 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -172,6 +172,7 @@ public: static void PopulateCustomVector(cmMakefile* mf, const char* definition, tm_VectorOfStrings& vec); + static void PopulateCustomInteger(cmMakefile* mf, const char* def, int& val); std::string GetToplevelPath(); |