ENH: Add method to populate custom integers
This commit is contained in:
parent
cbe845f7ef
commit
f7063fc661
|
@ -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");
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue