summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-10-06 15:27:40 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-10-11 10:46:10 (GMT)
commit66b290e7e2bbeb987ea83e2f9edaac99fe8593f5 (patch)
tree2382c213f05d1a19d0d3c17e667c712335ec5756 /Source/cmGlobalGenerator.h
parent5fe5c32480a5acf26bd20e52a091cd63747ed77d (diff)
downloadCMake-66b290e7e2bbeb987ea83e2f9edaac99fe8593f5.zip
CMake-66b290e7e2bbeb987ea83e2f9edaac99fe8593f5.tar.gz
CMake-66b290e7e2bbeb987ea83e2f9edaac99fe8593f5.tar.bz2
export(): Process the export() command at generate time.
Make the API for adding targets string based so that it can easily use cmGeneratorTarget. Teach the cmIncludeCommand to generate the exported file at configure-time instead if it is to be include()d. The RunCMake.ExportWithoutLanguage test now needs a dummy header.h file as expected error from export() is now reported after the missing file error.
Diffstat (limited to 'Source/cmGlobalGenerator.h')
-rw-r--r--Source/cmGlobalGenerator.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index b8860f1..c930b2b 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -31,6 +31,7 @@ class cmExternalMakefileProjectGenerator;
class cmTarget;
class cmInstallTargetGenerator;
class cmInstallFilesGenerator;
+class cmExportBuildFileGenerator;
/** \class cmGlobalGenerator
* \brief Responable for overseeing the generation process for the entire tree
@@ -293,18 +294,13 @@ public:
void ProcessEvaluationFiles();
- void AddExportedTargetsFile(const std::string &filename)
- {
- this->ExportedTargetsFiles.insert(filename);
- }
-
- bool IsExportedTargetsFile(const std::string &filename) const
- {
- const std::set<std::string>::const_iterator it
- = this->ExportedTargetsFiles.find(filename);
- return it != this->ExportedTargetsFiles.end();
- }
-
+ std::map<std::string, cmExportBuildFileGenerator*>& GetBuildExportSets()
+ {return this->BuildExportSets;}
+ void AddBuildExportSet(cmExportBuildFileGenerator*);
+ bool IsExportedTargetsFile(const std::string &filename) const;
+ bool GenerateImportFile(const std::string &file);
+ cmExportBuildFileGenerator*
+ GetExportedTargetsFile(const std::string &filename) const;
protected:
typedef std::vector<cmLocalGenerator*> GeneratorVector;
// for a project collect all its targets by following depend
@@ -356,6 +352,7 @@ protected:
bool InstallTargetEnabled;
// Sets of named target exports
cmExportSetMap ExportSets;
+ std::map<std::string, cmExportBuildFileGenerator*> BuildExportSets;
// Manifest of all targets that will be built for each configuration.
// This is computed just before local generators generate.
@@ -384,7 +381,6 @@ private:
std::map<cmStdString, cmStdString> ExtensionToLanguage;
std::map<cmStdString, int> LanguageToLinkerPreference;
std::map<cmStdString, cmStdString> LanguageToOriginalSharedLibFlags;
- std::set<std::string> ExportedTargetsFiles;
// Record hashes for rules and outputs.
struct RuleHash { char Data[32]; };