ENH: Add method to populate custom integers

This commit is contained in:
Andy Cedilnik 2005-01-26 10:10:41 -05:00
parent cbe845f7ef
commit f7063fc661
2 changed files with 15 additions and 0 deletions

View File

@ -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) std::string cmCTest::GetShortPathToFile(const char* cfname)
{ {
const std::string& sourceDir = GetDartConfiguration("SourceDirectory"); const std::string& sourceDir = GetDartConfiguration("SourceDirectory");

View File

@ -172,6 +172,7 @@ public:
static void PopulateCustomVector(cmMakefile* mf, const char* definition, static void PopulateCustomVector(cmMakefile* mf, const char* definition,
tm_VectorOfStrings& vec); tm_VectorOfStrings& vec);
static void PopulateCustomInteger(cmMakefile* mf, const char* def, int& val);
std::string GetToplevelPath(); std::string GetToplevelPath();