Commit c5ae7331 authored by Brad King's avatar Brad King

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.
parent c91a54db
......@@ -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\)$
find_package(NotHere CONFIG)
message(WARNING "This warning must be reachable.")
......@@ -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\)$
find_package(NotHere CONFIG REQUIRED)
message(FATAL_ERROR "This error must not be reachable.")
......@@ -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\)$
find_package(NotHere MODULE)
message(WARNING "This warning must be reachable.")
......@@ -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.$
find_package(NotHere MODULE REQUIRED)
message(FATAL_ERROR "This error must not be reachable.")
......@@ -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\)$
find_package(NotHere)
message(WARNING "This warning must be reachable.")
......@@ -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\)$
find_package(NotHere REQUIRED)
message(FATAL_ERROR "This error must not be reachable.")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment