Skip to content

Commit 78a92e2

Browse files
build: Require MSVC 17.11 for module support
17.10 and before has a bug that prevents the vulkan.cppm module from compiling. The module support wont be enabled unless the MSVC version contains the fix.
1 parent 6c539b2 commit 78a92e2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
with:
4747
cmakeVersion: ${{ matrix.cmake-version }}
4848
- uses: ilammy/msvc-dev-cmd@v1
49-
- run: cmake -S . -B build -D VULKAN_HEADERS_ENABLE_TESTS=ON -D VULKAN_HEADERS_ENABLE_INSTALL=ON -G Ninja -DVULKAN_HEADERS_ENABLE_MODULE=OFF # workaround for compiler bug in 17.10 and before
49+
- run: cmake -S . -B build -D VULKAN_HEADERS_ENABLE_TESTS=ON -D VULKAN_HEADERS_ENABLE_INSTALL=ON -G Ninja
5050
- run: cmake --build ./build
5151
- run: cmake --install build/ --prefix build/install
5252
- run: ctest --output-on-failure

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ add_library(Vulkan-Headers INTERFACE)
4242
add_library(Vulkan::Headers ALIAS Vulkan-Headers)
4343
target_include_directories(Vulkan-Headers INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
4444

45-
if (MSVC AND (MSVC_VERSION GREATER_EQUAL "1934") OR
45+
if (MSVC AND (MSVC_VERSION GREATER_EQUAL "1941") OR
4646
CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "16.0" OR
4747
CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "14.0")
4848
set(COMPILER_SUPPORTS_CXX_MODULES TRUE)

0 commit comments

Comments
 (0)