diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt index f426ed9..641feae 100644 --- a/tests/integration/CMakeLists.txt +++ b/tests/integration/CMakeLists.txt @@ -7,7 +7,7 @@ # ~~~ cmake_minimum_required(VERSION 3.22.1) -project(API LANGUAGES C) +project(API LANGUAGES C CXX) if (FIND_PACKAGE_TESTING) find_package(VulkanHeaders REQUIRED CONFIG) @@ -77,3 +77,16 @@ target_link_libraries(vk_icd PRIVATE Vulkan::Headers) # vk_layer.h add_library(vk_layer MODULE ../vk_layer.c) target_link_libraries(vk_layer PRIVATE Vulkan::Headers) + +# vulkan.hpp +add_library(vk_hpp MODULE ../vk_hpp.cpp) +target_compile_features(vk_hpp PUBLIC cxx_std_11) +target_link_libraries(vk_hpp PRIVATE Vulkan::Headers) + +# vulkan.cppm +if (VULKAN_HEADERS_ENABLE_MODULE) + add_library(vk_hpp_module MODULE ../vk_hpp_module.cpp) + target_compile_features(vk_hpp_module PUBLIC cxx_std_20) + set_target_properties(vk_hpp_module PROPERTIES CXX_SCAN_FOR_MODULES ON) + target_link_libraries(vk_hpp_module PRIVATE Vulkan::HppModule) +endif() \ No newline at end of file diff --git a/tests/vk_hpp.cpp b/tests/vk_hpp.cpp new file mode 100644 index 0000000..18bd57a --- /dev/null +++ b/tests/vk_hpp.cpp @@ -0,0 +1,6 @@ +#include + +int square(int i) +{ + return i * i; +} \ No newline at end of file diff --git a/tests/vk_hpp_module.cpp b/tests/vk_hpp_module.cpp new file mode 100644 index 0000000..6ae92b9 --- /dev/null +++ b/tests/vk_hpp_module.cpp @@ -0,0 +1,6 @@ +import vulkan_hpp; + +int square(int i) +{ + return i * i; +} \ No newline at end of file