summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-15 13:32:32 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-10-15 13:32:32 (GMT)
commitebffbda4476aae1e89029f2e24fd76a22765205a (patch)
treeb03c5806968dd58a35635de71af9ab2323688b75 /Source
parent29b1e591152dc56c03ae2b6d6721d5b1c297505a (diff)
parentaf1f6987571b6f8298b03e184aa4aad23882d5c8 (diff)
downloadCMake-ebffbda4476aae1e89029f2e24fd76a22765205a.zip
CMake-ebffbda4476aae1e89029f2e24fd76a22765205a.tar.gz
CMake-ebffbda4476aae1e89029f2e24fd76a22765205a.tar.bz2
Merge topic 'fix-CMP0024-multiple-directories'
af1f698 CMP0024: Store the fact of included export in global generator.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExportCommand.cxx4
-rw-r--r--Source/cmGlobalGenerator.h13
-rw-r--r--Source/cmIncludeCommand.cxx4
-rw-r--r--Source/cmMakefile.h13
4 files changed, 19 insertions, 15 deletions
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx
index 422b038..f335b8b 100644
--- a/Source/cmExportCommand.cxx
+++ b/Source/cmExportCommand.cxx
@@ -172,7 +172,9 @@ bool cmExportCommand
ebfg.SetCommand(this);
ebfg.SetExportOld(this->ExportOld.IsEnabled());
- this->Makefile->AddExportedTargetsFile(fname);
+ cmGlobalGenerator *gg = this->Makefile->GetLocalGenerator()
+ ->GetGlobalGenerator();
+ gg->AddExportedTargetsFile(fname);
// Compute the set of configurations exported.
std::vector<std::string> configurationTypes;
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 70f6e32..b8860f1 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -293,6 +293,18 @@ 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();
+ }
+
protected:
typedef std::vector<cmLocalGenerator*> GeneratorVector;
// for a project collect all its targets by following depend
@@ -372,6 +384,7 @@ 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]; };
diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx
index a3d8b83..39d4993 100644
--- a/Source/cmIncludeCommand.cxx
+++ b/Source/cmIncludeCommand.cxx
@@ -93,7 +93,9 @@ bool cmIncludeCommand
cmSystemTools::CollapseFullPath(fname.c_str(),
this->Makefile->GetStartDirectory());
- if (this->Makefile->IsExportedTargetsFile(fname_abs))
+ cmGlobalGenerator *gg = this->Makefile->GetLocalGenerator()
+ ->GetGlobalGenerator();
+ if (gg->IsExportedTargetsFile(fname_abs))
{
const char *modal = 0;
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 362b066..ca82336 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -489,18 +489,6 @@ public:
return this->cmCurrentListFile.c_str();
}
- 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();
- }
-
//@}
/**
@@ -1053,7 +1041,6 @@ private:
void EnforceDirectoryLevelRules();
bool GeneratingBuildSystem;
- std::set<std::string> ExportedTargetsFiles;
/**
* Old version of GetSourceFileWithOutput(const char*) kept for
* backward-compatibility. It implements a linear search and support