summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-04-03 18:05:32 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-04-03 18:05:57 (GMT)
commit058217669fdb089f652c68b9eb0a3231a7172c91 (patch)
treef9086530f67d02604f00aa23a741915502402d06 /Modules
parentd724060459f6adb5e7d99efde08c8fbacc4fdb5d (diff)
parent37da6af17d0d2cc8b499dc58f74866351e06c288 (diff)
downloadCMake-058217669fdb089f652c68b9eb0a3231a7172c91.zip
CMake-058217669fdb089f652c68b9eb0a3231a7172c91.tar.gz
CMake-058217669fdb089f652c68b9eb0a3231a7172c91.tar.bz2
Merge topic 'find-dependency-fix-17583'
37da6af17d find_dependency: Always search dependencies Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3161
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeFindDependencyMacro.cmake50
1 files changed, 24 insertions, 26 deletions
diff --git a/Modules/CMakeFindDependencyMacro.cmake b/Modules/CMakeFindDependencyMacro.cmake
index ab22701..bcdfbeb 100644
--- a/Modules/CMakeFindDependencyMacro.cmake
+++ b/Modules/CMakeFindDependencyMacro.cmake
@@ -31,35 +31,33 @@ CMakeFindDependencyMacro
#]=======================================================================]
macro(find_dependency dep)
- if (NOT ${dep}_FOUND)
- set(cmake_fd_quiet_arg)
- if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
- set(cmake_fd_quiet_arg QUIET)
- endif()
- set(cmake_fd_required_arg)
- if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
- set(cmake_fd_required_arg REQUIRED)
- endif()
+ set(cmake_fd_quiet_arg)
+ if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
+ set(cmake_fd_quiet_arg QUIET)
+ endif()
+ set(cmake_fd_required_arg)
+ if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
+ set(cmake_fd_required_arg REQUIRED)
+ endif()
- get_property(cmake_fd_alreadyTransitive GLOBAL PROPERTY
- _CMAKE_${dep}_TRANSITIVE_DEPENDENCY
- )
+ get_property(cmake_fd_alreadyTransitive GLOBAL PROPERTY
+ _CMAKE_${dep}_TRANSITIVE_DEPENDENCY
+ )
- find_package(${dep} ${ARGN}
- ${cmake_fd_quiet_arg}
- ${cmake_fd_required_arg}
- )
+ find_package(${dep} ${ARGN}
+ ${cmake_fd_quiet_arg}
+ ${cmake_fd_required_arg}
+ )
- if(NOT DEFINED cmake_fd_alreadyTransitive OR cmake_fd_alreadyTransitive)
- set_property(GLOBAL PROPERTY _CMAKE_${dep}_TRANSITIVE_DEPENDENCY TRUE)
- endif()
+ if(NOT DEFINED cmake_fd_alreadyTransitive OR cmake_fd_alreadyTransitive)
+ set_property(GLOBAL PROPERTY _CMAKE_${dep}_TRANSITIVE_DEPENDENCY TRUE)
+ endif()
- if (NOT ${dep}_FOUND)
- set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency ${dep} could not be found.")
- set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False)
- return()
- endif()
- set(cmake_fd_required_arg)
- set(cmake_fd_quiet_arg)
+ if (NOT ${dep}_FOUND)
+ set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency ${dep} could not be found.")
+ set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False)
+ return()
endif()
+ set(cmake_fd_required_arg)
+ set(cmake_fd_quiet_arg)
endmacro()