You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After numerous reports of builds being broken due to the addition of the
Vulkan-Module support code in CMake, the option is being set to OFF by
default. This prevents projects which do not use the module from not being
able to build due to compiler, build system, and platform issues. Projects
wishing to enable modules can set the cmake option
VULKAN_HEADERS_ENABLE_MODULE=ON to re-enable the module support.
Add a warning in case a user decides to enable the module but the platform
doesn't support modules.
Copy file name to clipboardExpand all lines: CMakeLists.txt
+6-2
Original file line number
Diff line number
Diff line change
@@ -52,9 +52,13 @@ if ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND (MSVC_VERSION GREATER_EQUAL "1941
52
52
set(COMPILER_SUPPORTS_CXX_MODULES TRUE)
53
53
endif()
54
54
55
-
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})
55
+
option(VULKAN_HEADERS_ENABLE_MODULE "Enables building of the Vulkan C++ module"OFF)
56
56
57
-
if (CMAKE_VERSIONVERSION_GREATER_EQUAL"3.28"AND VULKAN_HEADERS_ENABLE_MODULE)
57
+
if (VULKAN_HEADERS_ENABLE_MODULE AND (NOT COMPILER_SUPPORTS_CXX_MODULES ORCMAKE_VERSIONVERSION_LESS"3.28"))
58
+
message(WARNING "Vulkan C++ module support is requested but was disabled due to lacking support on this platform")
59
+
endif()
60
+
61
+
if (CMAKE_VERSIONVERSION_GREATER_EQUAL"3.28"AND VULKAN_HEADERS_ENABLE_MODULE AND COMPILER_SUPPORTS_CXX_MODULES)
58
62
add_library(Vulkan-Module)
59
63
add_library(Vulkan::VulkanHppModule ALIAS Vulkan-Module)
0 commit comments