diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-08-01 18:10:26 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-08-01 18:10:26 (GMT) |
commit | 2f98c791fae6f46af4463e9eed5d5a674d6f1ddb (patch) | |
tree | b2022ff1d3310b88ee917368a444bceafd4c3beb /Source/cmake.cxx | |
parent | 7d33e05a15bfb56c8dfba4731c2008567f244972 (diff) | |
download | CMake-2f98c791fae6f46af4463e9eed5d5a674d6f1ddb.zip CMake-2f98c791fae6f46af4463e9eed5d5a674d6f1ddb.tar.gz CMake-2f98c791fae6f46af4463e9eed5d5a674d6f1ddb.tar.bz2 |
ENH: Allow specifying cmake variables on the command line without specifying the type Bug #118 - Specifying cache entries with -D should not need the type
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index f309005..42c4f8f 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -185,12 +185,13 @@ void cmake::SetCacheArgs(const std::vector<std::string>& args) { std::string entry = arg.substr(2); std::string var, value; - cmCacheManager::CacheEntryType type; - if(cmCacheManager::ParseEntry(entry.c_str(), var, value, type)) + cmCacheManager::CacheEntryType type = cmCacheManager::UNINITIALIZED; + if(cmCacheManager::ParseEntry(entry.c_str(), var, value, type) || + cmCacheManager::ParseEntry(entry.c_str(), var, value)) { - this->m_CacheManager->AddCacheEntry(var.c_str(), value.c_str(), - "No help, variable specified on the command line.", - type); + this->m_CacheManager->AddCacheEntry(var.c_str(), value.c_str(), + "No help, variable specified on the command line.", + type); } else { |