ENH: Add method to convert from CacheEntryType to string
This commit is contained in:
parent
aae914bdd2
commit
42db187012
|
@ -37,6 +37,15 @@ const char* cmCacheManagerTypes[] =
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const char* cmCacheManager::TypeToString(cmCacheManager::CacheEntryType type)
|
||||||
|
{
|
||||||
|
if ( type > 6 || type < 0 )
|
||||||
|
{
|
||||||
|
return cmCacheManagerTypes[6];
|
||||||
|
}
|
||||||
|
return cmCacheManagerTypes[type];
|
||||||
|
}
|
||||||
|
|
||||||
cmCacheManager::CacheEntryType cmCacheManager::StringToType(const char* s)
|
cmCacheManager::CacheEntryType cmCacheManager::StringToType(const char* s)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
|
@ -90,6 +90,7 @@ public:
|
||||||
* can be different than just a path input
|
* can be different than just a path input
|
||||||
*/
|
*/
|
||||||
static CacheEntryType StringToType(const char*);
|
static CacheEntryType StringToType(const char*);
|
||||||
|
static const char* TypeToString(CacheEntryType);
|
||||||
|
|
||||||
///! Load a cache for given makefile. Loads from ouput home.
|
///! Load a cache for given makefile. Loads from ouput home.
|
||||||
bool LoadCache(cmMakefile*);
|
bool LoadCache(cmMakefile*);
|
||||||
|
|
Loading…
Reference in New Issue