diff options
author | Aurélien Gâteau <agateau@kde.org> | 2014-03-13 12:19:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-13 19:51:11 (GMT) |
commit | 34cd5fc451f8ff732ba192165ddf344dd9adcc68 (patch) | |
tree | ffef3778e096248736a823a2b513a50617710ec0 /Modules/CMakeFindDependencyMacro.cmake | |
parent | 7534967b65b03be558940e1a112918ee28d38c20 (diff) | |
download | CMake-34cd5fc451f8ff732ba192165ddf344dd9adcc68.zip CMake-34cd5fc451f8ff732ba192165ddf344dd9adcc68.tar.gz CMake-34cd5fc451f8ff732ba192165ddf344dd9adcc68.tar.bz2 |
find_dependency: Give more helpful message if VERSION is empty
Diffstat (limited to 'Modules/CMakeFindDependencyMacro.cmake')
-rw-r--r-- | Modules/CMakeFindDependencyMacro.cmake | 7 |
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) |