summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-12 14:13:13 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-03-12 14:13:13 (GMT)
commit5082e31ba3aeb10791982947a319305e7207735e (patch)
tree394537bf9dd40b521631155e04cfe68e4d737125
parent2c6970a3ca2034903e4fbb8d5433999e4e6166ab (diff)
parent224f50f42f8776e4742851daca32846d1041fbb9 (diff)
downloadCMake-5082e31ba3aeb10791982947a319305e7207735e.zip
CMake-5082e31ba3aeb10791982947a319305e7207735e.tar.gz
CMake-5082e31ba3aeb10791982947a319305e7207735e.tar.bz2
Merge topic 'fix-find_dependency-EXACT'
224f50f4 find_dependency: Make sure invalid EXACT use can be reported.
-rw-r--r--Modules/CMakeFindDependencyMacro.cmake6
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)