build: Require MSVC 17.11 for module support
Some checks failed
ci / cmake-unix (3.15, macos-latest) (push) Has been cancelled
ci / cmake-unix (3.15, ubuntu-latest) (push) Has been cancelled
ci / cmake-unix (latest, macos-latest) (push) Has been cancelled
ci / cmake-unix (latest, ubuntu-latest) (push) Has been cancelled
ci / cmake-windows (3.15) (push) Has been cancelled
ci / cmake-windows (latest) (push) Has been cancelled
ci / reuse (push) Has been cancelled

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.
This commit is contained in:
Charles Giessen 2024-07-10 11:08:19 -05:00 committed by Charles Giessen
parent 6c539b2ed2
commit 78a92e2c7c
2 changed files with 2 additions and 2 deletions

View file

@ -46,7 +46,7 @@ jobs:
with: with:
cmakeVersion: ${{ matrix.cmake-version }} cmakeVersion: ${{ matrix.cmake-version }}
- uses: ilammy/msvc-dev-cmd@v1 - uses: ilammy/msvc-dev-cmd@v1
- 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 - run: cmake -S . -B build -D VULKAN_HEADERS_ENABLE_TESTS=ON -D VULKAN_HEADERS_ENABLE_INSTALL=ON -G Ninja
- run: cmake --build ./build - run: cmake --build ./build
- run: cmake --install build/ --prefix build/install - run: cmake --install build/ --prefix build/install
- run: ctest --output-on-failure - run: ctest --output-on-failure

View file

@ -42,7 +42,7 @@ add_library(Vulkan-Headers INTERFACE)
add_library(Vulkan::Headers ALIAS Vulkan-Headers) add_library(Vulkan::Headers ALIAS Vulkan-Headers)
target_include_directories(Vulkan-Headers INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>) target_include_directories(Vulkan-Headers INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
if (MSVC AND (MSVC_VERSION GREATER_EQUAL "1934") OR if (MSVC AND (MSVC_VERSION GREATER_EQUAL "1941") OR
CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "16.0" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "16.0" OR
CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "14.0") CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "14.0")
set(COMPILER_SUPPORTS_CXX_MODULES TRUE) set(COMPILER_SUPPORTS_CXX_MODULES TRUE)