[Cmake-commits] CMake branch, next, updated. v3.4.0-rc2-1025-g3f2e77e
Stephen Kelly
steveire at gmail.com
Mon Oct 26 17:45:49 EDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 3f2e77edfc78b4a1780a1f9b0cc8ece0f4f030c6 (commit)
via 716ad6f482964d7653ba321eea53b48d60a8b745 (commit)
via 2d4fed8ff924cdb5f0af9c62d869b7e7c796e77f (commit)
via 151658ccee329ff2620872d689e5429a3d01196c (commit)
from 19ea1c6f3ec02bc9e06f4518f8dc1b2d3497aa22 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f2e77edfc78b4a1780a1f9b0cc8ece0f4f030c6
commit 3f2e77edfc78b4a1780a1f9b0cc8ece0f4f030c6
Merge: 19ea1c6 716ad6f
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Oct 26 17:45:47 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Oct 26 17:45:47 2015 -0400
Merge topic 'use-generator-target' into next
716ad6f4 Revert "cmake: Port find_package mode away from GetGeneratorTarget"
2d4fed8f Revert "VS6: Port to FindGeneratorTarget"
151658cc Revert "cmGlobalGenerator: Remove map from cmTarget to cmGeneratorTarget"
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=716ad6f482964d7653ba321eea53b48d60a8b745
commit 716ad6f482964d7653ba321eea53b48d60a8b745
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Oct 26 22:45:24 2015 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Oct 26 22:45:24 2015 +0100
Revert "cmake: Port find_package mode away from GetGeneratorTarget"
This reverts commit a67d87f7d1d8ea4a18c4bf59a3ba1b21c59bfd57.
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 2e96e59..16417fc 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -448,6 +448,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
// read in the list file to fill the cache
snapshot.SetDefaultDefinitions();
cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(gg, snapshot));
+ cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator(mf.get()));
mf->SetArgcArgv(args);
@@ -480,8 +481,6 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
std::vector<std::string> includeDirs;
cmSystemTools::ExpandListArgument(includes, includeDirs);
- gg->CreateGenerationObjects();
- cmLocalGenerator* lg = gg->LocalGenerators[0];
std::string includeFlags = lg->GetIncludeFlags(includeDirs, 0, language);
std::string definitions = mf->GetSafeDefinition("PACKAGE_DEFINITIONS");
@@ -511,9 +510,8 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
std::string linkPath;
std::string flags;
std::string linkFlags;
- gg->CreateGenerationObjects();
- cmGeneratorTarget *gtgt = gg->FindGeneratorTarget(tgt->GetName());
- cmLocalGenerator* lg = gtgt->GetLocalGenerator();
+ gg->CreateGeneratorTargets(cmGlobalGenerator::AllTargets, lg.get());
+ cmGeneratorTarget *gtgt = gg->GetGeneratorTarget(tgt);
lg->GetTargetFlags(linkLibs, frameworkPath, linkPath, flags, linkFlags,
gtgt, false);
linkLibs = frameworkPath + linkPath + linkLibs;
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2d4fed8ff924cdb5f0af9c62d869b7e7c796e77f
commit 2d4fed8ff924cdb5f0af9c62d869b7e7c796e77f
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Oct 26 22:45:21 2015 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Oct 26 22:45:21 2015 +0100
Revert "VS6: Port to FindGeneratorTarget"
This reverts commit 495ef58b5686cd3073aa1f0a6cd7fc5b1893ee64.
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index cdacb9e..fd0af61 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -1112,14 +1112,15 @@ void cmLocalVisualStudio6Generator
// Compute the proper name to use to link this library.
std::string lib;
std::string libDebug;
- cmGeneratorTarget* tgt =
- this->GlobalGenerator->FindGeneratorTarget(j->first.c_str());
+ cmTarget* tgt = this->GlobalGenerator->FindTarget(j->first.c_str());
if(tgt)
{
+ cmGeneratorTarget* gt =
+ this->GlobalGenerator->GetGeneratorTarget(tgt);
lib = cmSystemTools::GetFilenameWithoutExtension
- (tgt->GetFullName().c_str());
+ (gt->GetFullName().c_str());
libDebug = cmSystemTools::GetFilenameWithoutExtension
- (tgt->GetFullName("Debug").c_str());
+ (gt->GetFullName("Debug").c_str());
lib += ".lib";
libDebug += ".lib";
}
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=151658ccee329ff2620872d689e5429a3d01196c
commit 151658ccee329ff2620872d689e5429a3d01196c
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Oct 26 22:45:05 2015 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Oct 26 22:45:05 2015 +0100
Revert "cmGlobalGenerator: Remove map from cmTarget to cmGeneratorTarget"
This reverts commit 3e72e81c21ac623fe849f2272d2052fe2e68c1d6.
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 3d2db42..d53f0e3 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1208,6 +1208,8 @@ void cmGlobalGenerator::Configure()
void cmGlobalGenerator::CreateGenerationObjects(TargetTypes targetTypes)
{
this->CreateLocalGenerators();
+ cmDeleteAll(this->GeneratorTargets);
+ this->GeneratorTargets.clear();
this->CreateGeneratorTargets(targetTypes);
this->ComputeBuildFileGenerators();
}
@@ -1595,6 +1597,7 @@ void cmGlobalGenerator::CreateGeneratorTargets(
{
cmTarget* t = &ti->second;
cmGeneratorTarget* gt = new cmGeneratorTarget(t, lg);
+ this->GeneratorTargets[t] = gt;
lg->AddGeneratorTarget(gt);
}
}
@@ -1619,9 +1622,9 @@ void cmGlobalGenerator::CreateGeneratorTargets(TargetTypes targetTypes)
j = mf->GetOwnedImportedTargets().begin();
j != mf->GetOwnedImportedTargets().end(); ++j)
{
- cmLocalGenerator* lg = this->LocalGenerators[i];
- cmGeneratorTarget* gt = new cmGeneratorTarget(*j, lg);
- lg->AddOwnedImportedGeneratorTarget(gt);
+ cmGeneratorTarget* gt =
+ new cmGeneratorTarget(*j, this->LocalGenerators[i]);
+ this->GeneratorTargets[*j] = gt;
importedMap[*j] = gt;
}
}
@@ -1638,6 +1641,9 @@ void cmGlobalGenerator::CreateGeneratorTargets(TargetTypes targetTypes)
//----------------------------------------------------------------------------
void cmGlobalGenerator::ClearGeneratorMembers()
{
+ cmDeleteAll(this->GeneratorTargets);
+ this->GeneratorTargets.clear();
+
cmDeleteAll(this->BuildExportSets);
this->BuildExportSets.clear();
@@ -1656,6 +1662,20 @@ void cmGlobalGenerator::ClearGeneratorMembers()
}
//----------------------------------------------------------------------------
+cmGeneratorTarget*
+cmGlobalGenerator::GetGeneratorTarget(cmTarget const* t) const
+{
+ cmGeneratorTargetsType::const_iterator ti = this->GeneratorTargets.find(t);
+ if(ti == this->GeneratorTargets.end())
+ {
+ this->CMakeInstance->IssueMessage(
+ cmake::INTERNAL_ERROR, "Missing cmGeneratorTarget instance!");
+ return 0;
+ }
+ return ti->second;
+}
+
+//----------------------------------------------------------------------------
void cmGlobalGenerator::ComputeTargetObjectDirectory(cmGeneratorTarget*) const
{
}
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index bc6e17d..0057d61 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -42,6 +42,10 @@ class cmInstallTargetGenerator;
class cmInstallFilesGenerator;
class cmExportBuildFileGenerator;
+typedef std::map<cmTarget const*,
+ cmGeneratorTarget*,
+ cmTarget::StrictTargetComparison> cmGeneratorTargetsType;
+
/** \class cmGlobalGenerator
* \brief Responsible for overseeing the generation process for the entire tree
*
@@ -303,6 +307,14 @@ public:
TargetDependSet const& GetTargetDirectDepends(
const cmGeneratorTarget* target);
+ /** Get per-target generator information. */
+ cmGeneratorTarget* GetGeneratorTarget(cmTarget const*) const;
+
+ void AddGeneratorTarget(cmTarget* t, cmGeneratorTarget* gt)
+ {
+ this->GeneratorTargets[t] = gt;
+ }
+
const std::map<std::string, std::vector<cmLocalGenerator*> >& GetProjectMap()
const {return this->ProjectMap;}
@@ -470,6 +482,8 @@ private:
typedef std::map<cmGeneratorTarget const*, TargetDependSet> TargetDependMap;
TargetDependMap TargetDependencies;
+ // Per-target generator information.
+ cmGeneratorTargetsType GeneratorTargets;
friend class cmake;
void CreateGeneratorTargets(TargetTypes targetTypes, cmMakefile* mf,
cmLocalGenerator* lg,
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 9f36b54..c205d1a 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -257,6 +257,7 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
cmGeneratorTarget* gt = new cmGeneratorTarget(tgt, lg);
lg->AddGeneratorTarget(gt);
+ this->AddGeneratorTarget(tgt, gt);
// Organize in the "predefined targets" folder:
//
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index bb0c974..b819dad 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -88,6 +88,7 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets()
cmGeneratorTarget* gt = new cmGeneratorTarget(allBuild, gen[0]);
gen[0]->AddGeneratorTarget(gt);
+ this->AddGeneratorTarget(allBuild, gt);
#if 0
// Can't activate this code because we want ALL_BUILD
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index da8c814..6d4fc1f 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -460,6 +460,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
cmGeneratorTarget* allBuildGt = new cmGeneratorTarget(allbuild, root);
root->AddGeneratorTarget(allBuildGt);
+ root->GetGlobalGenerator()->AddGeneratorTarget(allbuild, allBuildGt);
// Refer to the main build configuration file for easy editing.
std::string listfile = root->GetCurrentSourceDirectory();
@@ -495,6 +496,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
cmGeneratorTarget* checkGt = new cmGeneratorTarget(check, root);
root->AddGeneratorTarget(checkGt);
+ root->GetGlobalGenerator()->AddGeneratorTarget(check, checkGt);
}
// now make the allbuild depend on all the non-utility targets
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index d92cbea..ec7c29f 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -62,8 +62,6 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg,
cmLocalGenerator::~cmLocalGenerator()
{
- cmDeleteAll(this->GeneratorTargets);
- cmDeleteAll(this->OwnedImportedGeneratorTargets);
}
void cmLocalGenerator::IssueMessage(cmake::MessageType t,
@@ -462,11 +460,6 @@ void cmLocalGenerator::AddImportedGeneratorTarget(cmGeneratorTarget* gt)
this->ImportedGeneratorTargets.push_back(gt);
}
-void cmLocalGenerator::AddOwnedImportedGeneratorTarget(cmGeneratorTarget* gt)
-{
- this->OwnedImportedGeneratorTargets.push_back(gt);
-}
-
struct NamedGeneratorTargetFinder
{
NamedGeneratorTargetFinder(std::string const& name)
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index e2f5519..67383d7 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -127,7 +127,6 @@ public:
void AddGeneratorTarget(cmGeneratorTarget* gt);
void AddImportedGeneratorTarget(cmGeneratorTarget* gt);
- void AddOwnedImportedGeneratorTarget(cmGeneratorTarget* gt);
cmGeneratorTarget* FindGeneratorTarget(const std::string& name) const;
cmGeneratorTarget* FindGeneratorTargetToUse(const std::string& name) const;
@@ -381,7 +380,6 @@ protected:
std::set<cmGeneratorTarget const*> WarnCMP0063;
std::vector<cmGeneratorTarget*> GeneratorTargets;
std::vector<cmGeneratorTarget*> ImportedGeneratorTargets;
- std::vector<cmGeneratorTarget*> OwnedImportedGeneratorTargets;
std::map<std::string, std::string> AliasTargets;
bool EmitUniversalBinaryFlags;
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index b813c14..225c03e 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -896,6 +896,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget(
cmGeneratorTarget* gt = new cmGeneratorTarget(autogenTarget, lg);
lg->AddGeneratorTarget(gt);
+ lg->GetGlobalGenerator()->AddGeneratorTarget(autogenTarget, gt);
// Set target folder
const char* autogenFolder = makefile->GetState()
-----------------------------------------------------------------------
Summary of changes:
Source/cmGlobalGenerator.cxx | 26 +++++++++++++++++++++++---
Source/cmGlobalGenerator.h | 14 ++++++++++++++
Source/cmGlobalVisualStudio8Generator.cxx | 1 +
Source/cmGlobalVisualStudioGenerator.cxx | 1 +
Source/cmGlobalXCodeGenerator.cxx | 2 ++
Source/cmLocalGenerator.cxx | 7 -------
Source/cmLocalGenerator.h | 2 --
Source/cmLocalVisualStudio6Generator.cxx | 9 +++++----
Source/cmQtAutoGeneratorInitializer.cxx | 1 +
Source/cmake.cxx | 8 +++-----
10 files changed, 50 insertions(+), 21 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list