[Cmake-commits] CMake branch, next, updated. v3.3.0-rc2-454-ga293874
Stephen Kelly
steveire at gmail.com
Sat Jun 13 02:47:21 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 a29387483823040d0d754d300333098c68e9f823 (commit)
via 0efe4944e1ae18b9204209b3ddf5811905e22357 (commit)
via bc1211fa7d5c8262b075e010667aed41f5205a75 (commit)
from 3d1166d1f8f61da181e3374c4b900a0fa2604035 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a29387483823040d0d754d300333098c68e9f823
commit a29387483823040d0d754d300333098c68e9f823
Merge: 3d1166d 0efe494
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 13 02:47:20 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Jun 13 02:47:20 2015 -0400
Merge topic 'fix-fast-special-targets' into next
0efe4944 cmGlobalGenerator: Add ComputeHomeRelativeOutputPath method.
bc1211fa cmLocalUnixMakefileGenerator3: Remove unused variable.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0efe4944e1ae18b9204209b3ddf5811905e22357
commit 0efe4944e1ae18b9204209b3ddf5811905e22357
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 13 08:38:27 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jun 13 08:38:27 2015 +0200
cmGlobalGenerator: Add ComputeHomeRelativeOutputPath method.
Fix generation of tgt/fast build targets.
Commit 363caa2f (cmLocalGenerator: De-virtualize Configure().,
2015-05-30) moved the computation of HomeRelativeOutputPath from
Configure-time to Generate-time, because it is only used at
Generate-time. However, that commit caused the member for one
local generator to be computed immediately before generating with
that local generator, whereas previously the members of all local
generators were computed before generating any of them.
The HomeRelativeOutputPath is used by the GetRelativeTargetDirectory
method, which is called by the
cmGlobalUnixMakefileGenerator3::WriteConvenienceRules method. That
method is called by the
cmLocalUnixMakefileGenerator3::WriteLocalMakefile method when generating
for the top-most (ie, the first) local generator. At that point,
the HomeRelativeOutputPath is not yet computed.
Fix that by computing the member just before generating anything.
This will eventually be done in the cmLocalUnixMakefileGenerator3
constructor instead, but further refactoring is needed to make
that possible.
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 9b02cbb..a462113 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1273,6 +1273,11 @@ void cmGlobalGenerator::Generate()
// it builds by default.
this->FillLocalGeneratorToTargetMap();
+ for (i = 0; i < this->LocalGenerators.size(); ++i)
+ {
+ this->LocalGenerators[i]->ComputeHomeRelativeOutputPath();
+ }
+
// Generate project files
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 42df2b8..6a8c5aa 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -47,6 +47,8 @@ public:
*/
virtual void Generate() {}
+ virtual void ComputeHomeRelativeOutputPath() {}
+
/**
* Calls TraceVSDependencies() on all targets of this generator.
*/
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 5c9768a..e292ba7 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -100,19 +100,6 @@ cmLocalUnixMakefileGenerator3::~cmLocalUnixMakefileGenerator3()
//----------------------------------------------------------------------------
void cmLocalUnixMakefileGenerator3::Generate()
{
- // Compute the path to use when referencing the current output
- // directory from the top output directory.
- this->HomeRelativeOutputPath =
- this->Convert(this->Makefile->GetCurrentBinaryDirectory(), HOME_OUTPUT);
- if(this->HomeRelativeOutputPath == ".")
- {
- this->HomeRelativeOutputPath = "";
- }
- if(!this->HomeRelativeOutputPath.empty())
- {
- this->HomeRelativeOutputPath += "/";
- }
-
// Store the configuration name that will be generated.
if(const char* config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE"))
{
@@ -164,6 +151,22 @@ void cmLocalUnixMakefileGenerator3::Generate()
this->WriteDirectoryInformationFile();
}
+void cmLocalUnixMakefileGenerator3::ComputeHomeRelativeOutputPath()
+{
+ // Compute the path to use when referencing the current output
+ // directory from the top output directory.
+ this->HomeRelativeOutputPath =
+ this->Convert(this->Makefile->GetCurrentBinaryDirectory(), HOME_OUTPUT);
+ if(this->HomeRelativeOutputPath == ".")
+ {
+ this->HomeRelativeOutputPath = "";
+ }
+ if(!this->HomeRelativeOutputPath.empty())
+ {
+ this->HomeRelativeOutputPath += "/";
+ }
+}
+
//----------------------------------------------------------------------------
void cmLocalUnixMakefileGenerator3::ComputeObjectFilenames(
std::map<cmSourceFile const*, std::string>& mapping,
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index dcb3016..4e4d146 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -39,6 +39,8 @@ public:
cmState::Snapshot snapshot);
virtual ~cmLocalUnixMakefileGenerator3();
+ virtual void ComputeHomeRelativeOutputPath();
+
/**
* Generate the makefile for this directory.
*/
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bc1211fa7d5c8262b075e010667aed41f5205a75
commit bc1211fa7d5c8262b075e010667aed41f5205a75
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 13 08:38:19 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jun 13 08:38:19 2015 +0200
cmLocalUnixMakefileGenerator3: Remove unused variable.
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index f1fd806..5c9768a 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1840,7 +1840,6 @@ void cmLocalUnixMakefileGenerator3
std::vector<std::string> commands;
// Write the all rule.
- std::string dir;
std::string recursiveTarget = this->Makefile->GetCurrentBinaryDirectory();
recursiveTarget += "/all";
-----------------------------------------------------------------------
Summary of changes:
Source/cmGlobalGenerator.cxx | 5 +++++
Source/cmLocalGenerator.h | 2 ++
Source/cmLocalUnixMakefileGenerator3.cxx | 30 ++++++++++++++++--------------
Source/cmLocalUnixMakefileGenerator3.h | 2 ++
4 files changed, 25 insertions(+), 14 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list