[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-751-gcb9fa4e

Stephen Kelly steveire at gmail.com
Mon Mar 10 04:07:21 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  cb9fa4e932ac4d6e75f80eb543e3256719ec0fdb (commit)
       via  08ba128f51c94e3e905d45cc36c6fb21d020df56 (commit)
      from  822c6f423250bb1b0dbe4fa4e1bb4c95bebb8f9c (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=cb9fa4e932ac4d6e75f80eb543e3256719ec0fdb
commit cb9fa4e932ac4d6e75f80eb543e3256719ec0fdb
Merge: 822c6f4 08ba128
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Mar 10 04:07:20 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Mar 10 04:07:20 2014 -0400

    Merge topic 'fix-find_dependency-EXACT' into next
    
    08ba128f find_dependency: Don't propagate EXACT argument.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=08ba128f51c94e3e905d45cc36c6fb21d020df56
commit 08ba128f51c94e3e905d45cc36c6fb21d020df56
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Mar 6 15:03:42 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Mar 6 15:07:37 2014 +0100

    find_dependency: Don't propagate EXACT argument.
    
    If a package is requested with an EXACT version, that doesn't imply
    that dependencies must be found EXACTly too.
    
    Extend the macro to allow specifying that a dependency must be found
    by EXACT version instead.

diff --git a/Modules/CMakeFindDependencyMacro.cmake b/Modules/CMakeFindDependencyMacro.cmake
index 9334ba3..8c61516 100644
--- a/Modules/CMakeFindDependencyMacro.cmake
+++ b/Modules/CMakeFindDependencyMacro.cmake
@@ -4,7 +4,7 @@
 #
 # ::
 #
-#     find_dependency(<dep> [<version>])
+#     find_dependency(<dep> [<version> [EXACT]])
 #
 #
 # ``find_dependency()`` wraps a :command:`find_package` call for a package
@@ -34,9 +34,18 @@ macro(find_dependency dep)
       set(cmake_fd_version ${ARGV1})
     endif()
     set(cmake_fd_exact_arg)
-    if(${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_EXACT)
+    if(${ARGC} GREATER 2)
+      if (NOT ${ARGV2} STREQUAL EXACT)
+        message(FATAL_ERROR "Invalid arguments to find_dependency")
+      endif()
+      if (NOT ${cmake_fd_version})
+        message(FATAL_ERROR "Invalid arguments to find_dependency. EXACT may only be specified if a VERSION is specified")
+      endif()
       set(cmake_fd_exact_arg EXACT)
     endif()
+    if(${ARGC} GREATER 3)
+      message(FATAL_ERROR "Invalid arguments to find_dependency")
+    endif()
     set(cmake_fd_quiet_arg)
     if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
       set(cmake_fd_quiet_arg QUIET)

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

Summary of changes:
 Modules/CMakeFindDependencyMacro.cmake |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list