1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
# ~~~
# Copyright (c) 2025 Valve Corporation
# Copyright (c) 2025 LunarG, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ~~~
if (ANDROID)
# currenlty only load vk_layer_validation_tests in for APK
return()
else()
add_executable(vk_layer_validation_undefined)
endif()
target_sources(vk_layer_validation_undefined PRIVATE
core_undefined.cpp
)
get_target_property(TEST_SOURCES vk_layer_validation_undefined SOURCES)
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES ${TEST_SOURCES})
add_dependencies(vk_layer_validation_undefined vvl)
target_link_libraries(vk_layer_validation_undefined PRIVATE
vk_test_framework
)
# Want next to other executable in build folder
set_target_properties(vk_layer_validation_undefined
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "$<TARGET_FILE_DIR:vk_layer_validation_tests>"
)
if(SLANG_INSTALL_DIR)
configure_slang_for_target(vk_layer_validation_undefined)
endif()
install(TARGETS vk_layer_validation_undefined)
if (WIN32)
install(FILES $<TARGET_RUNTIME_DLLS:vk_layer_validation_undefined> DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
if(SLANG_INSTALL_DIR)
install_slang_with_target(vk_layer_validation_undefined ${CMAKE_INSTALL_LIBDIR})
endif()
include(GoogleTest)
# If cross-compiling, discovery will use an executable with the wrong architecture and stop execution here.
# Set env. variable VVL_SKIP_GTEST_DISCOVERY to skip discovery.
if(NOT VVL_SKIP_GTEST_DISCOVERY)
gtest_discover_tests(vk_layer_validation_undefined DISCOVERY_TIMEOUT 100)
endif()
|