mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-28 18:09:31 -06:00
find_dependency: Give more helpful message if VERSION is empty
This commit is contained in:
committed by
Brad King
parent
7534967b65
commit
34cd5fc451
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user