aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorCharles Giessen <[email protected]>2024-06-18 14:32:15 -0500
committerCharles Giessen <[email protected]>2024-06-18 14:25:22 -0600
commite3c37e6e184a232e10b01dff5a065ce48c047f88 (patch)
tree4095340272c65027815048c9336b5a7ae7e7c6a1 /CMakeLists.txt
parentcde27c9456aed7117385e7469c4fc5ea3e1baa7f (diff)
downloadVulkan-Headers-e3c37e6e184a232e10b01dff5a065ce48c047f88.tar.gz
Vulkan-Headers-e3c37e6e184a232e10b01dff5a065ce48c047f88.zip
cmake: Workaround MSVC module support compiler bug
Adds the VULKAN_HEADERS_ENABLE_MODULE option to control whether to build the Vulkan-Hpp module. This is necessary to allow CI to pass while waiting for the MSVC version 17.11, which fixes an internal compiler bug, to be added to github actions runners.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4e6d7f1..8df7850 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,8 +48,9 @@ if (MSVC AND (MSVC_VERSION GREATER_EQUAL "1934") OR
set(COMPILER_SUPPORTS_CXX_MODULES TRUE)
endif()
+option(VULKAN_HEADERS_ENABLE_MODULE "Enables building of the Vulkan C++ module. Default is true if supported by the CMake version and compilers" ${COMPILER_SUPPORTS_CXX_MODULES})
-if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.28" AND COMPILER_SUPPORTS_CXX_MODULES)
+if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.28" AND VULKAN_HEADERS_ENABLE_MODULE)
add_library(Vulkan-Module)
add_library(Vulkan::VulkanHppModule ALIAS Vulkan-Module)
target_sources(Vulkan-Module