summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-14 13:59:49 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-14 13:59:52 (GMT)
commit967d09fec35262460d711504b76b4b95fe3245de (patch)
tree07e81a31c97b1bc0ee887d61ebb349c6daf6d953
parent59d3898bc74c950a08b58b885867b7f0d18be8d5 (diff)
parent34cd5fc451f8ff732ba192165ddf344dd9adcc68 (diff)
downloadCMake-967d09fec35262460d711504b76b4b95fe3245de.zip
CMake-967d09fec35262460d711504b76b4b95fe3245de.tar.gz
CMake-967d09fec35262460d711504b76b4b95fe3245de.tar.bz2
Merge branch 'fix-find_dependency-empty-version' into release
-rw-r--r--Modules/CMakeFindDependencyMacro.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/CMakeFindDependencyMacro.cmake b/Modules/CMakeFindDependencyMacro.cmake
index 99ffca8..73efaae 100644
--- a/Modules/CMakeFindDependencyMacro.cmake
+++ b/Modules/CMakeFindDependencyMacro.cmake
@@ -31,14 +31,17 @@ macro(find_dependency dep)
if (NOT ${dep}_FOUND)
set(cmake_fd_version)
if (${ARGC} GREATER 1)
- if (${ARGV1} STREQUAL EXACT)
+ if ("${ARGV1}" STREQUAL "")
+ message(FATAL_ERROR "Invalid arguments to find_dependency. VERSION is empty")
+ endif()
+ 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)
if(${ARGC} GREATER 2)
- if (NOT ${ARGV2} STREQUAL EXACT)
+ if (NOT "${ARGV2}" STREQUAL EXACT)
message(FATAL_ERROR "Invalid arguments to find_dependency")
endif()
set(cmake_fd_exact_arg EXACT)