summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-01-02 16:10:04 (GMT)
committerBrad King <brad.king@kitware.com>2013-05-24 13:02:45 (GMT)
commitb983a58bdf1a03a49f2512ac68390888669ac30b (patch)
treefdef14cc2d264b50e8bb48fbe53e2858852400de /Source/cmGlobalGenerator.h
parent272431a84ff13eb17cf04389428f57c7fe13e3a2 (diff)
downloadCMake-b983a58bdf1a03a49f2512ac68390888669ac30b.zip
CMake-b983a58bdf1a03a49f2512ac68390888669ac30b.tar.gz
CMake-b983a58bdf1a03a49f2512ac68390888669ac30b.tar.bz2
file: Add GENERATE command to produce files at generate time
The idea is to write to a temp file which contains generator expressions, and at generate time, evaluate the generator expressions, and write the result to a file. Because executables on Windows are limited in the length of command line it is possible to use, it is common to write command line arguments to a file instead and specify the file as a source of arguments. This new FILE(GENERATE) subcommand allows the use of generator expressions to create such files so that they can be used with add_custom_command for example.
Diffstat (limited to 'Source/cmGlobalGenerator.h')
-rw-r--r--Source/cmGlobalGenerator.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 11616e0..381918b 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -20,9 +20,11 @@
#include "cmSystemTools.h" // for cmSystemTools::OutputOption
#include "cmExportSetMap.h" // For cmExportSetMap
#include "cmGeneratorTarget.h"
+#include "cmGeneratorExpression.h"
class cmake;
class cmGeneratorTarget;
+class cmGeneratorExpressionEvaluationFile;
class cmMakefile;
class cmLocalGenerator;
class cmExternalMakefileProjectGenerator;
@@ -278,6 +280,14 @@ public:
static std::string EscapeJSON(const std::string& s);
+ void AddEvaluationFile(const std::string &inputFile,
+ cmsys::auto_ptr<cmCompiledGeneratorExpression> outputName,
+ cmMakefile *makefile,
+ cmsys::auto_ptr<cmCompiledGeneratorExpression> condition,
+ bool inputIsContent);
+
+ void ProcessEvaluationFiles();
+
protected:
typedef std::vector<cmLocalGenerator*> GeneratorVector;
// for a project collect all its targets by following depend
@@ -337,6 +347,7 @@ protected:
// All targets in the entire project.
std::map<cmStdString,cmTarget *> TotalTargets;
std::map<cmStdString,cmTarget *> ImportedTargets;
+ std::vector<cmGeneratorExpressionEvaluationFile*> EvaluationFiles;
virtual const char* GetPredefinedTargetsFolder();
virtual bool UseFolderProperty();