diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-05-16 19:15:21 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-05-16 19:15:21 (GMT) |
commit | 1cd9ce6f6e0597f6a4a0436285a67d979b03655c (patch) | |
tree | 1ce4055b5fd3b1eb6e80e419f4b29a574407512a /Source/cmSetCommand.cxx | |
parent | a5480276d5782f2bcc8d44cf4c5cbf29b980a1f0 (diff) | |
download | CMake-1cd9ce6f6e0597f6a4a0436285a67d979b03655c.zip CMake-1cd9ce6f6e0597f6a4a0436285a67d979b03655c.tar.gz CMake-1cd9ce6f6e0597f6a4a0436285a67d979b03655c.tar.bz2 |
ENH: unify make process on unix
Diffstat (limited to 'Source/cmSetCommand.cxx')
-rw-r--r-- | Source/cmSetCommand.cxx | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index dab5dbb..ecc7f53 100644 --- a/Source/cmSetCommand.cxx +++ b/Source/cmSetCommand.cxx @@ -52,6 +52,20 @@ bool cmSetCommand::Invoke(std::vector<std::string>& args) { return true; } + if(args[1] == "CACHE") + { + const char* type = "STRING"; // default type is string + if(args.size() > 2) + { + type = args[2].c_str(); + } + m_Makefile->AddDefinition(args[0].c_str(), ""); + cmCacheManager::GetInstance()->AddCacheEntry(args[0].c_str(), + "", + "Value Computed by CMake", + cmCacheManager::StringToType(type)); + return true; + } // expand value m_Makefile->ExpandVariablesInString(args[1]); @@ -60,10 +74,15 @@ bool cmSetCommand::Invoke(std::vector<std::string>& args) // should we store the result in the cache ? if (args.size() > 2 && args[2] == "CACHE") { + const char* type = "STRING"; // default type is string + if(args.size() > 3) + { + type = args[3].c_str(); + } cmCacheManager::GetInstance()->AddCacheEntry(args[0].c_str(), args[1].c_str(), "Value Computed by CMake", - cmCacheManager::STRING); + cmCacheManager::StringToType(type)); } return true; } |