diff options
author | Brad King <brad.king@kitware.com> | 2012-03-07 16:34:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-03-07 16:34:59 (GMT) |
commit | c5ae73316634b0d1fe56272ab011eefd9cb80e47 (patch) | |
tree | 4fa219ee84a781bcf0bd21b4bdb6c682b0427138 /Tests/CMakeCommands | |
parent | c91a54db3766aea8f8ab9d5a011db3bba67b12d4 (diff) | |
download | CMake-c5ae73316634b0d1fe56272ab011eefd9cb80e47.zip CMake-c5ae73316634b0d1fe56272ab011eefd9cb80e47.tar.gz CMake-c5ae73316634b0d1fe56272ab011eefd9cb80e47.tar.bz2 |
find_package: Test that REQUIRED aborts processing correctly
Verify that the command produces a FATAL_ERROR if and only if the
missing package is REQUIRED.
Diffstat (limited to 'Tests/CMakeCommands')
12 files changed, 26 insertions, 3 deletions
diff --git a/Tests/CMakeCommands/find_package/MissingConfig-stderr.txt b/Tests/CMakeCommands/find_package/MissingConfig-stderr.txt index 0d14dcb..1eae0bb 100644 --- a/Tests/CMakeCommands/find_package/MissingConfig-stderr.txt +++ b/Tests/CMakeCommands/find_package/MissingConfig-stderr.txt @@ -11,3 +11,9 @@ CMake Warning at MissingConfig.cmake:1 \(find_package\): been installed. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) + + +CMake Warning at MissingConfig.cmake:2 \(message\): + This warning must be reachable. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/CMakeCommands/find_package/MissingConfig.cmake b/Tests/CMakeCommands/find_package/MissingConfig.cmake index 3cebef1..238e7e4 100644 --- a/Tests/CMakeCommands/find_package/MissingConfig.cmake +++ b/Tests/CMakeCommands/find_package/MissingConfig.cmake @@ -1 +1,2 @@ find_package(NotHere CONFIG) +message(WARNING "This warning must be reachable.") diff --git a/Tests/CMakeCommands/find_package/MissingConfigRequired-stderr.txt b/Tests/CMakeCommands/find_package/MissingConfigRequired-stderr.txt index 56325d8..2ba774a 100644 --- a/Tests/CMakeCommands/find_package/MissingConfigRequired-stderr.txt +++ b/Tests/CMakeCommands/find_package/MissingConfigRequired-stderr.txt @@ -10,4 +10,4 @@ CMake Error at MissingConfigRequired.cmake:1 \(find_package\): "NotHere" provides a separate development package or SDK, be sure it has been installed. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/CMakeCommands/find_package/MissingConfigRequired.cmake b/Tests/CMakeCommands/find_package/MissingConfigRequired.cmake index 3c28552..0ae6702 100644 --- a/Tests/CMakeCommands/find_package/MissingConfigRequired.cmake +++ b/Tests/CMakeCommands/find_package/MissingConfigRequired.cmake @@ -1 +1,2 @@ find_package(NotHere CONFIG REQUIRED) +message(FATAL_ERROR "This error must not be reachable.") diff --git a/Tests/CMakeCommands/find_package/MissingModule-stderr.txt b/Tests/CMakeCommands/find_package/MissingModule-stderr.txt index 71b5eae..2ad460f 100644 --- a/Tests/CMakeCommands/find_package/MissingModule-stderr.txt +++ b/Tests/CMakeCommands/find_package/MissingModule-stderr.txt @@ -19,3 +19,8 @@ CMake Warning \(dev\) at MissingModule.cmake:1 \(find_package\): Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. + +CMake Warning at MissingModule.cmake:2 \(message\): + This warning must be reachable. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/CMakeCommands/find_package/MissingModule.cmake b/Tests/CMakeCommands/find_package/MissingModule.cmake index 420539f..76bcef2 100644 --- a/Tests/CMakeCommands/find_package/MissingModule.cmake +++ b/Tests/CMakeCommands/find_package/MissingModule.cmake @@ -1 +1,2 @@ find_package(NotHere MODULE) +message(WARNING "This warning must be reachable.") diff --git a/Tests/CMakeCommands/find_package/MissingModuleRequired-stderr.txt b/Tests/CMakeCommands/find_package/MissingModuleRequired-stderr.txt index c3cd350..fec05f1 100644 --- a/Tests/CMakeCommands/find_package/MissingModuleRequired-stderr.txt +++ b/Tests/CMakeCommands/find_package/MissingModuleRequired-stderr.txt @@ -18,4 +18,4 @@ CMake Warning \(dev\) at MissingModuleRequired.cmake:1 \(find_package\): Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. +This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/CMakeCommands/find_package/MissingModuleRequired.cmake b/Tests/CMakeCommands/find_package/MissingModuleRequired.cmake index 07f36c5..897eda6 100644 --- a/Tests/CMakeCommands/find_package/MissingModuleRequired.cmake +++ b/Tests/CMakeCommands/find_package/MissingModuleRequired.cmake @@ -1 +1,2 @@ find_package(NotHere MODULE REQUIRED) +message(FATAL_ERROR "This error must not be reachable.") diff --git a/Tests/CMakeCommands/find_package/MissingNormal-stderr.txt b/Tests/CMakeCommands/find_package/MissingNormal-stderr.txt index e5cbd97..f4c6fba 100644 --- a/Tests/CMakeCommands/find_package/MissingNormal-stderr.txt +++ b/Tests/CMakeCommands/find_package/MissingNormal-stderr.txt @@ -15,3 +15,9 @@ CMake Warning at MissingNormal.cmake:1 \(find_package\): been installed. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) + + +CMake Warning at MissingNormal.cmake:2 \(message\): + This warning must be reachable. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/CMakeCommands/find_package/MissingNormal.cmake b/Tests/CMakeCommands/find_package/MissingNormal.cmake index 778cd38..fb90e01 100644 --- a/Tests/CMakeCommands/find_package/MissingNormal.cmake +++ b/Tests/CMakeCommands/find_package/MissingNormal.cmake @@ -1 +1,2 @@ find_package(NotHere) +message(WARNING "This warning must be reachable.") diff --git a/Tests/CMakeCommands/find_package/MissingNormalRequired-stderr.txt b/Tests/CMakeCommands/find_package/MissingNormalRequired-stderr.txt index ac52aec..7bb7902 100644 --- a/Tests/CMakeCommands/find_package/MissingNormalRequired-stderr.txt +++ b/Tests/CMakeCommands/find_package/MissingNormalRequired-stderr.txt @@ -14,4 +14,4 @@ CMake Error at MissingNormalRequired.cmake:1 \(find_package\): "NotHere" provides a separate development package or SDK, be sure it has been installed. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/CMakeCommands/find_package/MissingNormalRequired.cmake b/Tests/CMakeCommands/find_package/MissingNormalRequired.cmake index 5c33fca..33353d8 100644 --- a/Tests/CMakeCommands/find_package/MissingNormalRequired.cmake +++ b/Tests/CMakeCommands/find_package/MissingNormalRequired.cmake @@ -1 +1,2 @@ find_package(NotHere REQUIRED) +message(FATAL_ERROR "This error must not be reachable.") |