[Cmake-commits] CMake branch, next, updated. v3.0.0-4042-gec1a6fd

Brad King brad.king at kitware.com
Tue Jul 1 10:17:09 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  ec1a6fdf6567f8c6d365787fa6c36691b666e616 (commit)
       via  ac8879ce91a61703c9c3fc1e06316dbe8d5a8786 (commit)
      from  679d78b5407a56268cb85cad9812d051f5fd4dc1 (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=ec1a6fdf6567f8c6d365787fa6c36691b666e616
commit ec1a6fdf6567f8c6d365787fa6c36691b666e616
Merge: 679d78b ac8879c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jul 1 10:17:08 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jul 1 10:17:08 2014 -0400

    Merge topic 'ninja-link-order-only-dependencies' into next
    
    ac8879ce Ninja: Add order-only dependencies to link commands (#14728)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ac8879ce91a61703c9c3fc1e06316dbe8d5a8786
commit ac8879ce91a61703c9c3fc1e06316dbe8d5a8786
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Tue Jul 1 10:14:27 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Jul 1 10:14:28 2014 -0400

    Ninja: Add order-only dependencies to link commands (#14728)
    
    A library or executable target that consists only of a reference to an
    object library may have no sources to compile or custom commands to run.
    The command in the target is the link (or archive) command.  Add missing
    order-only dependencies to link commands so that target ordering
    dependencies are satisfied for it without depending on an intermediate
    compilation rule.
    
    Extend the ObjectLibrary test to cover this case.
    
    Co-Author: Brad King <brad.king at kitware.com>

diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index cfcf9f4..15a1b32 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -608,6 +608,11 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
       std::string(cmake::GetCMakeFilesDirectoryPostSlash())
       + target.GetName() + ".rsp";
 
+  // Gather order-only dependencies.
+  cmNinjaDeps orderOnlyDeps;
+  this->GetLocalGenerator()->AppendTargetDepends(this->GetTarget(),
+    orderOnlyDeps);
+
   // Write the build statement for this target.
   globalGen.WriteBuild(this->GetBuildFileStream(),
                         comment.str(),
@@ -615,7 +620,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
                         outputs,
                         explicitDeps,
                         implicitDeps,
-                        emptyDeps,
+                        orderOnlyDeps,
                         vars,
                         rspfile,
                         commandLineLengthLimit);
diff --git a/Tests/ObjectLibrary/CMakeLists.txt b/Tests/ObjectLibrary/CMakeLists.txt
index 0aeefaa..75c34d8 100644
--- a/Tests/ObjectLibrary/CMakeLists.txt
+++ b/Tests/ObjectLibrary/CMakeLists.txt
@@ -59,4 +59,10 @@ add_executable(UseABinternal ${dummy}
   $<TARGET_OBJECTS:ABmain> $<TARGET_OBJECTS:A> $<TARGET_OBJECTS:B>
   )
 
+# Test target-level dependencies of executable without sources.
+file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/UseABinternalDep.cmake)
+add_custom_target(UseABinternalDep COMMAND ${CMAKE_COMMAND} -E touch UseABinternalDep.cmake)
+add_custom_command(TARGET UseABinternal POST_BUILD COMMAND ${CMAKE_COMMAND} -P UseABinternalDep.cmake)
+add_dependencies(UseABinternal UseABinternalDep)
+
 add_subdirectory(ExportLanguages)

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

Summary of changes:
 Source/cmNinjaNormalTargetGenerator.cxx |    7 ++++++-
 Tests/ObjectLibrary/CMakeLists.txt      |    6 ++++++
 2 files changed, 12 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list