diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-04-24 16:40:37 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-04-24 16:40:37 (GMT) |
commit | 818b0e5bc1755d72e429ab89391254647c194eb5 (patch) | |
tree | 3d9f48f45fa5d92d9f5717f35a0a837d8d23a863 /Source/cmCacheManager.cxx | |
parent | 435a8a70338d73d1f1eb1aa1cd431ee6a369765d (diff) | |
download | CMake-818b0e5bc1755d72e429ab89391254647c194eb5.zip CMake-818b0e5bc1755d72e429ab89391254647c194eb5.tar.gz CMake-818b0e5bc1755d72e429ab89391254647c194eb5.tar.bz2 |
BUG: fix build directory problem
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r-- | Source/cmCacheManager.cxx | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 90cfd3d..fb84d74 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -151,7 +151,7 @@ void cmCacheManager::AddCacheEntry(const char* key, m_Cache[key] = e; } -const char* cmCacheManager::GetCacheValue(const char* key) +const char* cmCacheManager::GetCacheValue(const char* key) { if(m_Cache.count(key)) { @@ -161,6 +161,19 @@ const char* cmCacheManager::GetCacheValue(const char* key) } +bool cmCacheManager::IsOn(const char* key) +{ + if(!m_Cache.count(key)) + { + return false; + } + std::string &v = m_Cache[key].m_Value; + return (v == "ON" || v == "on" || v == "1" || v == "true" || v == "yev" + || v == "TRUE" || v == "True" || v == "y" || v == "Y"); +} + + + void cmCacheManager::PrintCache(std::ostream& out) { out << "=================================================" << std::endl; @@ -176,3 +189,15 @@ void cmCacheManager::PrintCache(std::ostream& out) } +void cmCacheManager::AddCacheEntry(const char* key, bool v) +{ + if(v) + { + this->AddCacheEntry(key, "ON", cmCacheManager::BOOL); + } + else + { + this->AddCacheEntry(key, "OFF", cmCacheManager::BOOL); + } +} + |