Skip to content

Commit

Permalink
Trying to get msvc build happening on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Jul 10, 2023
1 parent b768df6 commit 5c8b26d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
30 changes: 30 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -32,13 +49,26 @@
"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": [
{
"name": "ninja-release",
"configurePreset": "ninja",
"configuration": "RelWithDebInfo"
},
{
"name": "msvc-release",
"configurePreset": "msvc",
"configuration": "RelWithDebInfo"
}
]
}

0 comments on commit 5c8b26d

Please sign in to comment.