summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx88
1 files changed, 31 insertions, 57 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index ac75933..b9de4d8 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -21,10 +21,11 @@
#include "cmQtAutomoc.h"
#include "cmSourceFile.h"
#include "cmVersion.h"
-#include "cmExportInstallFileGenerator.h"
+#include "cmTargetExport.h"
#include "cmComputeTargetDepends.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
+#include "cmGeneratorExpression.h"
#include <cmsys/Directory.hxx>
@@ -76,12 +77,12 @@ cmGlobalGenerator::~cmGlobalGenerator()
}
this->ClearGeneratorTargets();
- this->ClearExportSets();
}
void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
cmMakefile *mf,
- bool optional) {
+ bool optional)
+{
std::string langComp = "CMAKE_";
langComp += lang;
langComp += "_COMPILER";
@@ -817,7 +818,7 @@ void cmGlobalGenerator::Configure()
{
this->FirstTimeProgress = 0.0f;
this->ClearGeneratorTargets();
- this->ClearExportSets();
+ this->ExportSets.clear();
// Delete any existing cmLocalGenerators
unsigned int i;
for (i = 0; i < this->LocalGenerators.size(); ++i)
@@ -893,7 +894,7 @@ bool cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS()
<< "The \"" << this->GetName() << "\" generator does not support "
<< "duplicate custom targets. "
<< "Consider using a Makefiles generator or fix the project to not "
- << "use duplicat target names.";
+ << "use duplicate target names.";
cmSystemTools::Error(e.str().c_str());
return false;
}
@@ -1107,6 +1108,16 @@ void cmGlobalGenerator::CreateGeneratorTargets()
this->ComputeTargetObjects(gt);
generatorTargets[t] = gt;
}
+
+ for(std::vector<cmTarget*>::const_iterator
+ j = mf->GetOwnedImportedTargets().begin();
+ j != mf->GetOwnedImportedTargets().end(); ++j)
+ {
+ cmGeneratorTarget* gt = new cmGeneratorTarget(*j);
+ this->GeneratorTargets[*j] = gt;
+ generatorTargets[*j] = gt;
+ }
+
mf->SetGeneratorTargets(generatorTargets);
}
}
@@ -1152,13 +1163,13 @@ void cmGlobalGenerator::CheckLocalGenerators()
{
manager = this->LocalGenerators[i]->GetMakefile()->GetCacheManager();
this->LocalGenerators[i]->ConfigureFinalPass();
- cmGeneratorTargetsType targets =
- this->LocalGenerators[i]->GetMakefile()->GetGeneratorTargets();
- for (cmGeneratorTargetsType::iterator l = targets.begin();
+ cmTargets &targets =
+ this->LocalGenerators[i]->GetMakefile()->GetTargets();
+ for (cmTargets::iterator l = targets.begin();
l != targets.end(); l++)
{
const cmTarget::LinkLibraryVectorType& libs =
- l->second->Target->GetOriginalLinkLibraries();
+ l->second.GetOriginalLinkLibraries();
for(cmTarget::LinkLibraryVectorType::const_iterator lib = libs.begin();
lib != libs.end(); ++lib)
{
@@ -1174,14 +1185,23 @@ void cmGlobalGenerator::CheckLocalGenerators()
}
std::string text = notFoundMap[varName];
text += "\n linked by target \"";
- text += l->second->GetName();
+ text += l->second.GetName();
text += "\" in directory ";
text+=this->LocalGenerators[i]->GetMakefile()->GetCurrentDirectory();
notFoundMap[varName] = text;
}
}
std::vector<std::string> incs;
- this->LocalGenerators[i]->GetIncludeDirectories(incs, l->second);
+ const char *incDirProp = l->second.GetProperty("INCLUDE_DIRECTORIES");
+ if (!incDirProp)
+ {
+ continue;
+ }
+
+ std::string incDirs = cmGeneratorExpression::Preprocess(incDirProp,
+ cmGeneratorExpression::StripAllGeneratorExpressions);
+
+ cmSystemTools::ExpandListArgument(incDirs.c_str(), incs);
for( std::vector<std::string>::const_iterator incDir = incs.begin();
incDir != incs.end(); ++incDir)
@@ -1489,52 +1509,6 @@ void cmGlobalGenerator::AddInstallComponent(const char* component)
}
}
-void cmGlobalGenerator::AddTargetToExports(const char* exportSetName,
- cmTarget* target,
- cmInstallTargetGenerator* archive,
- cmInstallTargetGenerator* runTime,
- cmInstallTargetGenerator* library,
- cmInstallTargetGenerator* framework,
- cmInstallTargetGenerator* bundle,
- cmInstallFilesGenerator* headers)
-{
- if ((exportSetName) && (*exportSetName) && (target))
- {
- cmTargetExport* te = new cmTargetExport(target, archive, runTime, library,
- framework, bundle, headers);
- this->ExportSets[exportSetName].push_back(te);
- }
-}
-
-//----------------------------------------------------------------------------
-void cmGlobalGenerator::ClearExportSets()
-{
- for(std::map<cmStdString, std::vector<cmTargetExport*> >::iterator
- setIt = this->ExportSets.begin();
- setIt != this->ExportSets.end(); ++setIt)
- {
- for(unsigned int i = 0; i < setIt->second.size(); ++i)
- {
- delete setIt->second[i];
- }
- }
- this->ExportSets.clear();
-}
-
-const std::vector<cmTargetExport*>* cmGlobalGenerator::GetExportSet(
- const char* name) const
-{
- std::map<cmStdString, std::vector<cmTargetExport*> >::const_iterator
- exportSetIt = this->ExportSets.find(name);
- if (exportSetIt != this->ExportSets.end())
- {
- return &exportSetIt->second;
- }
-
- return 0;
-}
-
-
void cmGlobalGenerator::EnableInstallTarget()
{
this->InstallTargetEnabled = true;