diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 88040a96..7b9ccd9a 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -39,8 +39,17 @@ jobs: - name: Run CMake+Ninja+CTest to generate/build/test. uses: lukka/run-cmake@v10 - id: runcmake + id: runcmake-ninja with: configurePreset: 'ninja' buildPreset: 'ninja-release' testPreset: 'ninja-release' + + - name: Run CMake+MSVC+CTest to generate/build/test. + uses: lukka/run-cmake@v10 + if: startsWith(matrix.os, 'win') + id: runcmake-msvc + with: + configurePreset: 'msvc' + buildPreset: 'msvc-release' + testPreset: 'msvc-release' diff --git a/CMakePresets.json b/CMakePresets.json index d707bfb9..bd0b1c51 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -22,6 +22,23 @@ "value": true } } + }, + { + "name": "msvc", + "displayName": "MSVC", + "description": "Configure and generate MSVC project files for all configurations", + "binaryDir": "${sourceDir}/builds/${presetName}", + "generator": "Visual Studio 17 2022", + "cacheVariables": { + "CMAKE_EXPORT_COMPILE_COMMANDS": { + "type": "boolean", + "value": true + }, + "CLAP_BUILD_TESTS": { + "type": "boolean", + "value": true + } + } } ], "buildPresets": [ @@ -32,6 +49,14 @@ "description": "Build ninja Release configuration", "configuration": "RelWithDebInfo", "targets": ["clap-tests"] + }, + { + "name": "msvc-release", + "configurePreset": "msvc", + "displayName": "Build msvc-release", + "description": "Build msvc Release configuration", + "configuration": "RelWithDebInfo", + "targets": ["clap-tests"] } ], "testPresets": [ @@ -39,6 +64,11 @@ "name": "ninja-release", "configurePreset": "ninja", "configuration": "RelWithDebInfo" + }, + { + "name": "msvc-release", + "configurePreset": "msvc", + "configuration": "RelWithDebInfo" } ] } \ No newline at end of file