diff options
author | Alex Neundorf <neundorf@kde.org> | 2012-03-13 20:19:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-03-13 20:56:52 (GMT) |
commit | 0cf84472d7bf7c62b4f7db5052765cb88ec29eef (patch) | |
tree | d993925cc33d5fe8122fecea94d22c7caad45d23 /Tests/RunCMake/find_package | |
parent | 56ae3f94129aebd03af6778895a322a86dc9db77 (diff) | |
download | CMake-0cf84472d7bf7c62b4f7db5052765cb88ec29eef.zip CMake-0cf84472d7bf7c62b4f7db5052765cb88ec29eef.tar.gz CMake-0cf84472d7bf7c62b4f7db5052765cb88ec29eef.tar.bz2 |
find_package: additional test for checking the error message
This patch adds a test which checks the error message, which is
produced in the case that a Config file has set Foo_FOUND to FALSE
by itself.
Alex
Diffstat (limited to 'Tests/RunCMake/find_package')
4 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake index ba57f99..34fa733 100644 --- a/Tests/RunCMake/find_package/RunCMakeTest.cmake +++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake @@ -12,3 +12,4 @@ run_cmake(MissingConfigOneName) run_cmake(MissingConfigRequired) run_cmake(MissingConfigVersion) run_cmake(MixedModeOptions) +run_cmake(SetFoundFALSE) diff --git a/Tests/RunCMake/find_package/SetFoundFALSE-stderr.txt b/Tests/RunCMake/find_package/SetFoundFALSE-stderr.txt new file mode 100644 index 0000000..695f645 --- /dev/null +++ b/Tests/RunCMake/find_package/SetFoundFALSE-stderr.txt @@ -0,0 +1,9 @@ +CMake Warning at SetFoundFALSE.cmake:2 \(find_package\): + Found package configuration file: + + .*/Tests/RunCMake/find_package/SetFoundFALSEConfig.cmake + + but it set SetFoundFALSE_FOUND to FALSE so package "SetFoundFALSE" is + considered to be NOT FOUND. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/find_package/SetFoundFALSE.cmake b/Tests/RunCMake/find_package/SetFoundFALSE.cmake new file mode 100644 index 0000000..fbcec3c --- /dev/null +++ b/Tests/RunCMake/find_package/SetFoundFALSE.cmake @@ -0,0 +1,2 @@ +set(SetFoundFALSE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +find_package(SetFoundFALSE CONFIG) diff --git a/Tests/RunCMake/find_package/SetFoundFALSEConfig.cmake b/Tests/RunCMake/find_package/SetFoundFALSEConfig.cmake new file mode 100644 index 0000000..ae6bd14 --- /dev/null +++ b/Tests/RunCMake/find_package/SetFoundFALSEConfig.cmake @@ -0,0 +1 @@ +set(SetFoundFALSE_FOUND FALSE) |