diff options
author | Aiden Lambert <aidenramen29@gmail.com> | 2022-06-21 21:03:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-06-22 13:46:46 (GMT) |
commit | f849e33452df159eceec9ae1e8d3d127caafc907 (patch) | |
tree | e5b835d9e06b3a29073571f3fa16171851b85f79 /Tests/FindVulkan | |
parent | d94e09ec88c99434941029cde07b6c1e6bd0dde1 (diff) | |
download | CMake-f849e33452df159eceec9ae1e8d3d127caafc907.zip CMake-f849e33452df159eceec9ae1e8d3d127caafc907.tar.gz CMake-f849e33452df159eceec9ae1e8d3d127caafc907.tar.bz2 |
FindVulkan: Add 'volk' component
Diffstat (limited to 'Tests/FindVulkan')
-rw-r--r-- | Tests/FindVulkan/Test/CMakeLists.txt | 5 | ||||
-rw-r--r-- | Tests/FindVulkan/Test/main-volk.cxx | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/Tests/FindVulkan/Test/CMakeLists.txt b/Tests/FindVulkan/Test/CMakeLists.txt index 42543ac..727e1ce 100644 --- a/Tests/FindVulkan/Test/CMakeLists.txt +++ b/Tests/FindVulkan/Test/CMakeLists.txt @@ -7,6 +7,7 @@ set(components glslang shaderc_combined SPIRV-Tools + volk ) if(APPLE) list(APPEND components MoltenVK) @@ -75,6 +76,10 @@ if(APPLE) add_test(NAME test_tgt_MoltenVK COMMAND test_tgt_MoltenVK) endif() +add_executable(test_tgt_volk main-volk.cxx) +target_link_libraries(test_tgt_volk Vulkan::volk) +add_test(NAME test_tgt_volk COMMAND test_tgt_volk) + if(Vulkan_GLSLC_EXECUTABLE) add_test(NAME test_glslc COMMAND ${CMAKE_COMMAND} diff --git a/Tests/FindVulkan/Test/main-volk.cxx b/Tests/FindVulkan/Test/main-volk.cxx new file mode 100644 index 0000000..2ec9fb4 --- /dev/null +++ b/Tests/FindVulkan/Test/main-volk.cxx @@ -0,0 +1,14 @@ +#include <iostream> + +#include <volk/volk.h> + +int main() +{ + if (volkInitialize() != VK_SUCCESS) { + std::cout << "volk initialization success!" << std::endl; + } else { + std::cout << "volk initialization failure!" << std::endl; + } + + return 0; +} |