[Cmake-commits] CMake branch, next, updated. v3.0.0-rc3-1890-g87a2a70
Stephen Kelly
steveire at gmail.com
Fri Apr 4 11:11:47 EDT 2014
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 87a2a70c51e7517b7fed0b9df1d52076e6657299 (commit)
via 6c202d15b3097434ac72dec11b920dcafa8c1e51 (commit)
via ce0aae7039c96f7c2532a38348b97d73acc52b37 (commit)
from 0bb5c2545b89ba234ee26304fcafcfa427efe048 (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=87a2a70c51e7517b7fed0b9df1d52076e6657299
commit 87a2a70c51e7517b7fed0b9df1d52076e6657299
Merge: 0bb5c25 6c202d1
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Apr 4 11:11:46 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Apr 4 11:11:46 2014 -0400
Merge topic 'optimize-source-file-processing' into next
6c202d15 Ninja: Query custom commands once per target, not once per file.
ce0aae70 CMake Nightly Date Stamp
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c202d15b3097434ac72dec11b920dcafa8c1e51
commit 6c202d15b3097434ac72dec11b920dcafa8c1e51
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Apr 4 17:09:56 2014 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Apr 4 17:09:56 2014 +0200
Ninja: Query custom commands once per target, not once per file.
Computing the source files is now more expensive, so the Ninja
generator became very slow with a large number of files.
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 56155ef..cb6eb90 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -494,6 +494,9 @@ cmNinjaTargetGenerator
{
cmCustomCommand const* cc = (*si)->GetCustomCommand();
this->GetLocalGenerator()->AddCustomCommandTarget(cc, this->GetTarget());
+ // Record the custom commands for this target. The container is used
+ // in WriteObjectBuildStatement when called in a loop below.
+ this->CustomCommands.push_back((*si)->GetCustomCommand());
}
std::vector<cmSourceFile const*> headerSources;
this->GeneratorTarget->GetHeaderSources(headerSources, config);
@@ -565,14 +568,11 @@ cmNinjaTargetGenerator
}
// Add order-only dependencies on custom command outputs.
- std::vector<cmSourceFile const*> customCommands;
- std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
- this->GeneratorTarget->GetCustomCommands(customCommands, config);
- for(std::vector<cmSourceFile const*>::const_iterator
- si = customCommands.begin();
- si != customCommands.end(); ++si)
+ for(std::vector<cmCustomCommand const*>::const_iterator
+ cci = this->CustomCommands.begin();
+ cci != this->CustomCommands.end(); ++cci)
{
- cmCustomCommand const* cc = (*si)->GetCustomCommand();
+ cmCustomCommand const* cc = *cci;
cmCustomCommandGenerator ccg(*cc, this->GetConfigName(),
this->GetMakefile());
const std::vector<std::string>& ccoutputs = ccg.GetOutputs();
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h
index 8669e6e..8073af2 100644
--- a/Source/cmNinjaTargetGenerator.h
+++ b/Source/cmNinjaTargetGenerator.h
@@ -153,6 +153,7 @@ private:
cmLocalNinjaGenerator* LocalGenerator;
/// List of object files for this target.
cmNinjaDeps Objects;
+ std::vector<cmCustomCommand const*> CustomCommands;
typedef std::map<std::string, std::string> LanguageFlagMap;
LanguageFlagMap LanguageFlags;
-----------------------------------------------------------------------
Summary of changes:
Source/CMakeVersion.cmake | 2 +-
Source/cmNinjaTargetGenerator.cxx | 14 +++++++-------
Source/cmNinjaTargetGenerator.h | 1 +
3 files changed, 9 insertions(+), 8 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list