summaryrefslogtreecommitdiffstats
path: root/Source/cmLoadCacheCommand.h
diff options
context:
space:
mode:
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);
};