Tests: Check find_dependency empty extra arguments

Add cases for empty arg 2 and arg 3.
This commit is contained in:
Brad King 2014-03-13 15:49:08 -04:00
parent 9914e7cd95
commit a25b809f20
7 changed files with 22 additions and 0 deletions

View File

@ -1,5 +1,7 @@
include(RunCMake) include(RunCMake)
run_cmake(EXACT-no-version) run_cmake(EXACT-no-version)
run_cmake(empty-version)
run_cmake(empty-arg-3)
run_cmake(invalid-arg-3) run_cmake(invalid-arg-3)
run_cmake(extra-args) run_cmake(extra-args)

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,5 @@
CMake Error at .*Modules/CMakeFindDependencyMacro.cmake:[0-9]+ \(message\):
Invalid arguments to find_dependency
Call Stack \(most recent call first\):
empty-arg-3.cmake:4 \(find_dependency\)
CMakeLists.txt:4 \(include\)

View File

@ -0,0 +1,4 @@
include(CMakeFindDependencyMacro)
find_dependency(Pack1 1.2 "")

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,5 @@
CMake Error at .*/Modules/CMakeFindDependencyMacro.cmake:[0-9]+ \(message\):
Invalid arguments to find_dependency. VERSION is empty
Call Stack \(most recent call first\):
empty-version.cmake:4 \(find_dependency\)
CMakeLists.txt:4 \(include\)

View File

@ -0,0 +1,4 @@
include(CMakeFindDependencyMacro)
find_dependency(Pack1 "")