summaryrefslogtreecommitdiffstats
path: root/Source/cmSetCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-03-29 16:04:19 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-03-29 16:04:19 (GMT)
commitdbdb0adce84b7a1a37fb058f65c8734ff29429c3 (patch)
tree427d4db1f0985dafdbdf32c7e79721a9339cfd68 /Source/cmSetCommand.cxx
parent7359c6bd16b04c39c0925314862d5342b67d89c8 (diff)
downloadCMake-dbdb0adce84b7a1a37fb058f65c8734ff29429c3.zip
CMake-dbdb0adce84b7a1a37fb058f65c8734ff29429c3.tar.gz
CMake-dbdb0adce84b7a1a37fb058f65c8734ff29429c3.tar.bz2
ENH: add ability to use ; separated lists in SET and expand them for addexecutable and addlibrary
Diffstat (limited to 'Source/cmSetCommand.cxx')
-rw-r--r--Source/cmSetCommand.cxx20
1 files changed, 19 insertions, 1 deletions
diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx
index 122df61..8ab33e4 100644
--- a/Source/cmSetCommand.cxx
+++ b/Source/cmSetCommand.cxx
@@ -41,7 +41,25 @@ bool cmSetCommand::InitialPass(std::vector<std::string> const& args)
cmCacheManager::CacheEntryType type = cmCacheManager::STRING; // required if cache
const char* docstring = 0; // required if cache
std::string::size_type cacheStart = 0;
-
+
+ // check for SET(VAR v1 v2 ... vn)
+ // and create
+ if(args.size() > 2)
+ {
+ if(args[1] != "CACHE" && args[2] != "CACHE")
+ {
+ value = args[1];
+ for(int i =2; i < args.size(); ++i)
+ {
+ value += ";";
+ value += args[i];
+ }
+ m_Makefile->AddDefinition(variable, value.c_str());
+ return true;
+ }
+ }
+
+
if(args.size() == 2)
{
// SET (VAR value )