mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-13 18:08:40 -05:00
Merge topic 'fix-CMP0024-multiple-directories'
af1f698 CMP0024: Store the fact of included export in global generator.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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]; };
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user