diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 81823ab..c2e2be7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -6,15 +6,24 @@ # SPDX-License-Identifier: Apache-2.0 # ~~~ -# Test add_subdirectory suppport -add_test(NAME integration.add_subdirectory +# Test add_subdirectory suppport for headers +add_test(NAME integration.add_subdirectory_headers COMMAND ${CMAKE_CTEST_COMMAND} --build-and-test ${CMAKE_CURRENT_LIST_DIR}/integration - ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory + ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_headers --build-generator ${CMAKE_GENERATOR} --build-options -DFIND_PACKAGE_TESTING=OFF -DVULKAN_HEADERS_ENABLE_MODULE=OFF ) +# Test add_subdirectory suppport for C++20 modules +add_test(NAME integration.add_subdirectory_modules + COMMAND ${CMAKE_CTEST_COMMAND} + --build-and-test ${CMAKE_CURRENT_LIST_DIR}/integration + ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_modules + --build-generator ${CMAKE_GENERATOR} + --build-options -DFIND_PACKAGE_TESTING=OFF -DVULKAN_HEADERS_ENABLE_MODULE=ON +) + set(test_install_dir "${CMAKE_CURRENT_BINARY_DIR}/install") add_test(NAME integration.install COMMAND ${CMAKE_COMMAND} --install ${VULKAN_HEADERS_BINARY_DIR} --prefix ${test_install_dir} --config $ diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt index a641fd2..f426ed9 100644 --- a/tests/integration/CMakeLists.txt +++ b/tests/integration/CMakeLists.txt @@ -18,6 +18,9 @@ endif() if (NOT TARGET Vulkan::Headers) message(FATAL_ERROR "Vulkan::Headers target not defined") endif() +if (NOT TARGET Vulkan::HppModule AND VULKAN_HEADERS_ENABLE_MODULE) + message(FATAL_ERROR "Vulkan::HppModule target not defined") +endif() if (FIND_PACKAGE_TESTING) if (NOT DEFINED VulkanHeaders_VERSION) @@ -37,6 +40,9 @@ if (NOT FIND_PACKAGE_TESTING) if (NOT TARGET Vulkan-Headers) message(FATAL_ERROR "Backcompat for Vulkan-Headers target broken!") endif() + if (NOT TARGET Vulkan-HppModule AND VULKAN_HEADERS_ENABLE_MODULE) + message(FATAL_ERROR "Backcompat for Vulkan-HppModule target broken!") + endif() endif() set(CMAKE_C_STANDARD 99)