aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.yml27
-rw-r--r--CMakeLists.txt3
-rw-r--r--tests/CMakeLists.txt2
3 files changed, 25 insertions, 7 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4f4cd8a..5ba23a2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -17,11 +17,11 @@ permissions:
contents: read
jobs:
- cmake:
+ cmake-unix:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [ ubuntu-latest, windows-latest, macos-latest ]
+ os: [ ubuntu-latest, macos-latest ]
cmake-version: [ '3.15', 'latest']
steps:
- uses: actions/checkout@v4
@@ -30,9 +30,26 @@ jobs:
cmakeVersion: ${{ matrix.cmake-version }}
- 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
- - run: cmake --build ./build --verbose
- - run: cmake --install build/ --prefix build/install --verbose
- - run: ctest --output-on-failure --verbose
+ - run: cmake --build ./build
+ - run: cmake --install build/ --prefix build/install
+ - run: ctest --output-on-failure
+ working-directory: build
+
+ cmake-windows:
+ runs-on: windows-latest
+ strategy:
+ matrix:
+ cmake-version: [ '3.15', 'latest']
+ steps:
+ - uses: actions/checkout@v4
+ - uses: lukka/get-cmake@latest
+ with:
+ cmakeVersion: ${{ matrix.cmake-version }}
+ - 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 --build ./build
+ - run: cmake --install build/ --prefix build/install
+ - run: ctest --output-on-failure
working-directory: build
reuse:
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
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 5a5984b..81823ab 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -12,7 +12,7 @@ add_test(NAME integration.add_subdirectory
--build-and-test ${CMAKE_CURRENT_LIST_DIR}/integration
${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory
--build-generator ${CMAKE_GENERATOR}
- --build-options -DFIND_PACKAGE_TESTING=OFF
+ --build-options -DFIND_PACKAGE_TESTING=OFF -DVULKAN_HEADERS_ENABLE_MODULE=OFF
)
set(test_install_dir "${CMAKE_CURRENT_BINARY_DIR}/install")