summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-04-29 14:02:53 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-04-29 14:02:53 (GMT)
commit42db1870120481bbd75dd1b056bc7909c2da9232 (patch)
tree23e1236ffb563c16b1a27096d8662b79c0e61d04 /Source
parentaae914bdd21af81739594bb94e935181925872a1 (diff)
downloadCMake-42db1870120481bbd75dd1b056bc7909c2da9232.zip
CMake-42db1870120481bbd75dd1b056bc7909c2da9232.tar.gz
CMake-42db1870120481bbd75dd1b056bc7909c2da9232.tar.bz2
ENH: Add method to convert from CacheEntryType to string
Diffstat (limited to 'Source')
-rw-r--r--Source/cmCacheManager.cxx9
-rw-r--r--Source/cmCacheManager.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 7b213a0..43027e9 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -37,6 +37,15 @@ const char* cmCacheManagerTypes[] =
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)
{
int i = 0;
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h
index 3dbaa58..12c2aef 100644
--- a/Source/cmCacheManager.h
+++ b/Source/cmCacheManager.h
@@ -90,6 +90,7 @@ public:
* can be different than just a path input
*/
static CacheEntryType StringToType(const char*);
+ static const char* TypeToString(CacheEntryType);
///! Load a cache for given makefile. Loads from ouput home.
bool LoadCache(cmMakefile*);