Skip to content

Commit

Permalink
find_package-components-failed test to verify install export set
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmaynard committed Aug 11, 2022
1 parent 0715f2d commit d12530e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions testing/find/find_package-components-failed.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ set(CMAKE_PREFIX_PATH "${rapids-cmake-testing-dir}/find/find_package-components/

rapids_find_package(FakeDependency 11 COMPONENTS AAAAA
BUILD_EXPORT_SET test_export_set
INSTALL_EXPORT_SET test_export_set
)

if(FakeDependency_FOUND)
message(FATAL_ERROR "rapids_find_package recorded incorrect FOUND state for a failed find_package request")
endif()

set(path "${CMAKE_BINARY_DIR}/rapids-cmake/test_export_set/build/package_FakeDependency.cmake")
if(EXISTS "${path}")
message(FATAL_ERROR "rapids_find_package(BUILD) recorded a failed find_package request")
set(b_path "${CMAKE_BINARY_DIR}/rapids-cmake/test_export_set/build/package_FakeDependency.cmake")
set(i_path "${CMAKE_BINARY_DIR}/rapids-cmake/test_export_set/install/package_FakeDependency.cmake")
if(EXISTS "${b_path}" OR EXISTS "${i_path}")
message(FATAL_ERROR "rapids_find_package(BUILD_EXPORT_SET or INSTALL_EXPORT_SET) recorded a failed find_package request")
endif()

0 comments on commit d12530e

Please sign in to comment.