[Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-619-gf05a7d0

Brad King brad.king at kitware.com
Wed Oct 19 09:01:08 EDT 2016


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  f05a7d0668b7d1f6e540e9478332eeff04090c23 (commit)
       via  3a9e92bce1c10e0082d431a61e100485fd6cf270 (commit)
      from  fe5e4f05abf1b557c226395271a0e4eff61631ab (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=f05a7d0668b7d1f6e540e9478332eeff04090c23
commit f05a7d0668b7d1f6e540e9478332eeff04090c23
Merge: fe5e4f0 3a9e92b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 19 09:01:07 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Oct 19 09:01:07 2016 -0400

    Merge topic 'ninja-only-object-rules' into next
    
    3a9e92bc Ninja: Add compile rules only for languages that are actually compiled


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a9e92bce1c10e0082d431a61e100485fd6cf270
commit 3a9e92bce1c10e0082d431a61e100485fd6cf270
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 18 15:35:10 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Oct 18 15:35:10 2016 -0400

    Ninja: Add compile rules only for languages that are actually compiled
    
    In `WriteLanguageRules` we collect all languages used for source files
    in a target.  However, this only needs to include sources that are
    actually going to be compiled into object files.  No object file build
    statements will be generated for other sources.
    
    This avoids generating language compile rules for source files that
    are not compiled due to being marked as `HEADER_FILE_ONLY`.
    
    Issue: #16373

diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index b28b19a..80d6d93 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -106,10 +106,11 @@ void cmNinjaNormalTargetGenerator::WriteLanguagesRules()
 
   // Write rules for languages compiled in this target.
   std::set<std::string> languages;
-  std::vector<cmSourceFile*> sourceFiles;
-  this->GetGeneratorTarget()->GetSourceFiles(
+  std::vector<cmSourceFile const*> sourceFiles;
+  this->GetGeneratorTarget()->GetObjectSources(
     sourceFiles, this->GetMakefile()->GetSafeDefinition("CMAKE_BUILD_TYPE"));
-  for (std::vector<cmSourceFile*>::const_iterator i = sourceFiles.begin();
+  for (std::vector<cmSourceFile const*>::const_iterator i =
+         sourceFiles.begin();
        i != sourceFiles.end(); ++i) {
     const std::string& lang = (*i)->GetLanguage();
     if (!lang.empty()) {

-----------------------------------------------------------------------

Summary of changes:
 Source/cmNinjaNormalTargetGenerator.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list