1# ~~~ 2# Copyright 2022-2023 The Khronos Group Inc. 3# Copyright 2022-2023 Valve Corporation 4# Copyright 2022-2023 LunarG, Inc. 5# 6# SPDX-License-Identifier: Apache-2.0 7# ~~~ 8 9# Test add_subdirectory suppport 10add_test(NAME integration.add_subdirectory 11 COMMAND ${CMAKE_CTEST_COMMAND} 12 --build-and-test ${CMAKE_CURRENT_LIST_DIR}/integration 13 ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory 14 --build-generator ${CMAKE_GENERATOR} 15 --build-options -DFIND_PACKAGE_TESTING=OFF -DVULKAN_HEADERS_ENABLE_MODULE=OFF 16) 17 18set(test_install_dir "${CMAKE_CURRENT_BINARY_DIR}/install") 19add_test(NAME integration.install 20 COMMAND ${CMAKE_COMMAND} --install ${VULKAN_HEADERS_BINARY_DIR} --prefix ${test_install_dir} --config $<CONFIG> 21) 22 23# Test find_package suppport 24add_test(NAME integration.find_package 25 COMMAND ${CMAKE_CTEST_COMMAND} 26 --build-and-test ${CMAKE_CURRENT_LIST_DIR}/integration 27 ${CMAKE_CURRENT_BINARY_DIR}/find_package 28 --build-generator ${CMAKE_GENERATOR} 29 --build-options -DFIND_PACKAGE_TESTING=ON -DCMAKE_PREFIX_PATH=${test_install_dir} 30) 31 32# Installing comes before testing 33set_tests_properties(integration.find_package PROPERTIES DEPENDS integration.install) 34