diff options
author | Brad King <brad.king@kitware.com> | 2014-03-12 14:12:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-12 14:12:06 (GMT) |
commit | 7534967b65b03be558940e1a112918ee28d38c20 (patch) | |
tree | 960fcf450d43f9bffb79e6ba18f2839c394dec63 /Modules | |
parent | c2d1ea3181894430799c561233f551f5ee9ecbe5 (diff) | |
parent | 224f50f42f8776e4742851daca32846d1041fbb9 (diff) | |
download | CMake-7534967b65b03be558940e1a112918ee28d38c20.zip CMake-7534967b65b03be558940e1a112918ee28d38c20.tar.gz CMake-7534967b65b03be558940e1a112918ee28d38c20.tar.bz2 |
Merge branch 'fix-find_dependency-EXACT' into release
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeFindDependencyMacro.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/CMakeFindDependencyMacro.cmake b/Modules/CMakeFindDependencyMacro.cmake index 8c61516..99ffca8 100644 --- a/Modules/CMakeFindDependencyMacro.cmake +++ b/Modules/CMakeFindDependencyMacro.cmake @@ -31,6 +31,9 @@ macro(find_dependency dep) if (NOT ${dep}_FOUND) set(cmake_fd_version) if (${ARGC} GREATER 1) + if (${ARGV1} STREQUAL EXACT) + message(FATAL_ERROR "Invalid arguments to find_dependency. EXACT may only be specified if a VERSION is specified") + endif() set(cmake_fd_version ${ARGV1}) endif() set(cmake_fd_exact_arg) @@ -38,9 +41,6 @@ macro(find_dependency dep) 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) |