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  460cc0a18df64a920c7ce51eebd64506d31660db (commit)
       via  ac14cbf01710c08e9bf31670cf40d88512b55752 (commit)
       via  817d31db9797bfc1c6ff7e60e420532362b14463 (commit)
      from  d19d3bd1b3e67c566b7a2bf1bbf18c0aff29a559 (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=460cc0a18df64a920c7ce51eebd64506d31660db
commit 460cc0a18df64a920c7ce51eebd64506d31660db
Merge: d19d3bd ac14cbf
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Fri Mar 27 16:26:12 2015 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Fri Mar 27 16:26:12 2015 -0400

    Merge topic 'add_dependencies-INTERFACE-libraries' into next
    
    ac14cbf0 Allow add_dependencies() on INTERFACE libraries (#15414)
    817d31db Help: Format add_dependencies documentation


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ac14cbf01710c08e9bf31670cf40d88512b55752
commit ac14cbf01710c08e9bf31670cf40d88512b55752
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Fri Mar 27 16:25:09 2015 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Fri Mar 27 16:25:09 2015 -0400

    Allow add_dependencies() on INTERFACE libraries (#15414)
    
    Revert commit v3.0.0-rc1~175^2~20 (add_dependencies: Disallow use with
    INTERFACE_LIBRARY, 2013-12-25).  Teach our dependency analysis to
    transitively follow INTERFACE target utility dependencies as was done or
    IMPORTED targets in commit v2.8.6~127^2~1 (Allow add_dependencies() on
    imported targets, 2010-11-19).  Extend the InterfaceLibrary test with a
    case to cover header generation for a header-only INTERFACE library via
    a custom target.

diff --git a/Help/command/add_dependencies.rst 
b/Help/command/add_dependencies.rst
index 1cbac20..c3583cf 100644
--- a/Help/command/add_dependencies.rst
+++ b/Help/command/add_dependencies.rst
@@ -13,8 +13,8 @@ is one created by one of the :command:`add_executable`,
 :command:`add_library`, or :command:`add_custom_target` commands.
 
 Dependencies added to an :ref:`imported target <Imported Targets>`
-are followed transitively in its place since the target itself does
-not build.
+or an :ref:`interface library <Interface Libraries>` are followed
+transitively in its place since the target itself does not build.
 
 See the ``DEPENDS`` option of :command:`add_custom_target` and
 :command:`add_custom_command` commands for adding file-level
diff --git a/Help/release/dev/add_dependencies-INTERFACE-libraries.rst 
b/Help/release/dev/add_dependencies-INTERFACE-libraries.rst
new file mode 100644
index 0000000..dfac2af
--- /dev/null
+++ b/Help/release/dev/add_dependencies-INTERFACE-libraries.rst
@@ -0,0 +1,7 @@
+add_dependencies-INTERFACE-libraries
+------------------------------------
+
+* The :command:`add_dependencies` command learned to allow dependencies
+  to be added to :ref:`interface libraries <Interface Libraries>`.
+  Dependencies added to an interface library are followed transitively
+  in its place since the target itself does not build.
diff --git a/Source/cmAddDependenciesCommand.cxx 
b/Source/cmAddDependenciesCommand.cxx
index b560452..3a74946 100644
--- a/Source/cmAddDependenciesCommand.cxx
+++ b/Source/cmAddDependenciesCommand.cxx
@@ -33,15 +33,6 @@ bool cmAddDependenciesCommand
     }
   if(cmTarget* target = this->Makefile->FindTargetToUse(target_name))
     {
-    if (target->GetType() == cmTarget::INTERFACE_LIBRARY)
-      {
-      std::ostringstream e;
-      e << "Cannot add target-level dependencies to INTERFACE library "
-        "target \"" << target_name << "\".\n";
-      this->SetError(e.str());
-      return false;
-      }
-
     std::vector<std::string>::const_iterator s = args.begin();
     ++s; // skip over target_name
     for (; s != args.end(); ++s)
diff --git a/Source/cmComputeTargetDepends.cxx 
b/Source/cmComputeTargetDepends.cxx
index cf2b88e..bbffd5d 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -418,9 +418,11 @@ void cmComputeTargetDepends::AddTargetDepend(int 
depender_index,
                                              cmTarget const* dependee,
                                              bool linking)
 {
-  if(dependee->IsImported())
+  if(dependee->IsImported() ||
+     dependee->GetType() == cmTarget::INTERFACE_LIBRARY)
     {
-    // Skip imported targets but follow their utility dependencies.
+    // Skip IMPORTED and INTERFACE targets but follow their utility
+    // dependencies.
     std::set<cmLinkItem> const& utils = dependee->GetUtilityItems();
     for(std::set<cmLinkItem>::const_iterator i = utils.begin();
         i != utils.end(); ++i)
diff --git a/Tests/InterfaceLibrary/headerdir/CMakeLists.txt 
b/Tests/InterfaceLibrary/headerdir/CMakeLists.txt
index 98f521e..826a9ed 100644
--- a/Tests/InterfaceLibrary/headerdir/CMakeLists.txt
+++ b/Tests/InterfaceLibrary/headerdir/CMakeLists.txt
@@ -3,6 +3,11 @@ set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
 
 add_library(headeriface INTERFACE)
 
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/iface_header_builddir.h"
-  "#define IFACE_HEADER_BUILDDIR\n"
-)
+add_custom_target(headeriface_gen
+  COMMENT "Generating iface_header_builddir.h"
+  COMMAND ${CMAKE_COMMAND} -E copy_if_different
+    ${CMAKE_CURRENT_SOURCE_DIR}/iface_header_builddir.h.in
+    ${CMAKE_CURRENT_BINARY_DIR}/iface_header_builddir.h
+  VERBATIM
+  )
+add_dependencies(headeriface headeriface_gen)
diff --git a/Tests/InterfaceLibrary/headerdir/iface_header_builddir.h.in 
b/Tests/InterfaceLibrary/headerdir/iface_header_builddir.h.in
new file mode 100644
index 0000000..42dd6df
--- /dev/null
+++ b/Tests/InterfaceLibrary/headerdir/iface_header_builddir.h.in
@@ -0,0 +1 @@
+#define IFACE_HEADER_BUILDDIR
diff --git a/Tests/RunCMake/interface_library/RunCMakeTest.cmake 
b/Tests/RunCMake/interface_library/RunCMakeTest.cmake
index 08e81c6..201daa7 100644
--- a/Tests/RunCMake/interface_library/RunCMakeTest.cmake
+++ b/Tests/RunCMake/interface_library/RunCMakeTest.cmake
@@ -7,5 +7,4 @@ run_cmake(whitelist)
 run_cmake(invalid_signature)
 run_cmake(global-interface)
 run_cmake(genex_link)
-run_cmake(add_dependencies)
 run_cmake(add_custom_command-TARGET)
diff --git a/Tests/RunCMake/interface_library/add_dependencies-result.txt 
b/Tests/RunCMake/interface_library/add_dependencies-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/interface_library/add_dependencies-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/interface_library/add_dependencies-stderr.txt 
b/Tests/RunCMake/interface_library/add_dependencies-stderr.txt
deleted file mode 100644
index c550b68..0000000
--- a/Tests/RunCMake/interface_library/add_dependencies-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-CMake Error at add_dependencies.cmake:4 \(add_dependencies\):
-  add_dependencies Cannot add target-level dependencies to INTERFACE library
-  target "iface".
-
-Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/interface_library/add_dependencies.cmake 
b/Tests/RunCMake/interface_library/add_dependencies.cmake
deleted file mode 100644
index 12cdfb4..0000000
--- a/Tests/RunCMake/interface_library/add_dependencies.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-
-add_library(foo empty.cpp)
-add_library(iface INTERFACE)
-add_dependencies(iface foo)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=817d31db9797bfc1c6ff7e60e420532362b14463
commit 817d31db9797bfc1c6ff7e60e420532362b14463
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Fri Mar 27 16:23:41 2015 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Fri Mar 27 16:24:19 2015 -0400

    Help: Format add_dependencies documentation
    
    Add reStructuredText markup.

diff --git a/Help/command/add_dependencies.rst 
b/Help/command/add_dependencies.rst
index 10997ec..1cbac20 100644
--- a/Help/command/add_dependencies.rst
+++ b/Help/command/add_dependencies.rst
@@ -7,13 +7,16 @@ Add a dependency between top-level targets.
 
   add_dependencies(<target> [<target-dependency>]...)
 
-Make a top-level <target> depend on other top-level targets to ensure
-that they build before <target> does.  A top-level target is one
-created by ADD_EXECUTABLE, ADD_LIBRARY, or ADD_CUSTOM_TARGET.
-Dependencies added to an IMPORTED target are followed transitively in
-its place since the target itself does not build.
+Make a top-level ``<target>`` depend on other top-level targets to
+ensure that they build before ``<target>`` does.  A top-level target
+is one created by one of the :command:`add_executable`,
+:command:`add_library`, or :command:`add_custom_target` commands.
 
-See the DEPENDS option of ADD_CUSTOM_TARGET and ADD_CUSTOM_COMMAND for
-adding file-level dependencies in custom rules.  See the
-OBJECT_DEPENDS option in SET_SOURCE_FILES_PROPERTIES to add file-level
-dependencies to object files.
+Dependencies added to an :ref:`imported target <Imported Targets>`
+are followed transitively in its place since the target itself does
+not build.
+
+See the ``DEPENDS`` option of :command:`add_custom_target` and
+:command:`add_custom_command` commands for adding file-level
+dependencies in custom rules.  See the :prop_sf:`OBJECT_DEPENDS`
+source file property to add file-level dependencies to object files.

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

Summary of changes:
 Help/command/add_dependencies.rst                  |   21 +++++++++++---------
 .../dev/add_dependencies-INTERFACE-libraries.rst   |    7 +++++++
 Source/cmAddDependenciesCommand.cxx                |    9 ---------
 Source/cmComputeTargetDepends.cxx                  |    6 ++++--
 Tests/InterfaceLibrary/headerdir/CMakeLists.txt    |   11 +++++++---
 .../headerdir/iface_header_builddir.h.in           |    1 +
 .../RunCMake/interface_library/RunCMakeTest.cmake  |    1 -
 .../interface_library/add_dependencies-result.txt  |    1 -
 .../interface_library/add_dependencies-stderr.txt  |    6 ------
 .../interface_library/add_dependencies.cmake       |    4 ----
 10 files changed, 32 insertions(+), 35 deletions(-)
 create mode 100644 Help/release/dev/add_dependencies-INTERFACE-libraries.rst
 create mode 100644 Tests/InterfaceLibrary/headerdir/iface_header_builddir.h.in
 delete mode 100644 Tests/RunCMake/interface_library/add_dependencies-result.txt
 delete mode 100644 Tests/RunCMake/interface_library/add_dependencies-stderr.txt
 delete mode 100644 Tests/RunCMake/interface_library/add_dependencies.cmake


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to