summaryrefslogtreecommitdiffstats
path: root/Source/cmLoadCacheCommand.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-11-20 23:00:02 (GMT)
committerBrad King <brad.king@kitware.com>2002-11-20 23:00:02 (GMT)
commit7ef61736648d213bdc147866da6e2d4cdaa9cf20 (patch)
tree1b1ab58b986765c59668da99c1044eddd902f066 /Source/cmLoadCacheCommand.h
parentc2addf16306c6f8cd971e7cbe62c71a040e9dab5 (diff)
downloadCMake-7ef61736648d213bdc147866da6e2d4cdaa9cf20.zip
CMake-7ef61736648d213bdc147866da6e2d4cdaa9cf20.tar.gz
CMake-7ef61736648d213bdc147866da6e2d4cdaa9cf20.tar.bz2
ENH: Added READ_WITH_PREFIX option to LOAD_CACHE command. This allows reading of cache values from another cache without actually creating local copies of the cache entires. The values are stored as prefixed local makefile variables.
Diffstat (limited to 'Source/cmLoadCacheCommand.h')
-rw-r--r--Source/cmLoadCacheCommand.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/cmLoadCacheCommand.h b/Source/cmLoadCacheCommand.h
index c0b5ad7..925cd3b 100644
--- a/Source/cmLoadCacheCommand.h
+++ b/Source/cmLoadCacheCommand.h
@@ -65,14 +65,26 @@ public:
{
return
"LOAD_CACHE(pathToCacheFile [EXCLUDE entry1...] [INCLUDE_INTERNALS entry1...])\n"
+ "LOAD_CACHE(pathToCacheFile READ_WITH_PREFIX prefix entry1...)\n"
"Load in the values from another cache. This is useful for a project "
"that depends on another project built in a different tree."
"EXCLUDE option can be used to provide a list of entries to be excluded."
"INCLUDE_INTERNALS can be used to provide a list of internal entries"
- "to be included. Normally, no internal entries are brougt in.";
+ "to be included. Normally, no internal entries are brougt in.\n"
+ "The READ_WITH_PREFIX form will read the cache and store the requested "
+ "entries in variables with their name prefixed with the given prefix. "
+ "This form only reads the values, and does not create local cache entries.";
}
cmTypeMacro(cmLoadCacheCommand, cmCommand);
+protected:
+
+ std::set<cmStdString> VariablesToRead;
+ std::string Prefix;
+
+ bool ReadWithPrefix(std::vector<std::string> const& args);
+ void CheckLine(const char* line);
+ bool ParseEntry(const char* entry, std::string& var, std::string& value);
};