Skip to content

Commit

Permalink
cmake: Add a CMakePresets.json for msvc that handle Debug build with
Browse files Browse the repository at this point in the history
success
  • Loading branch information
OlivierLDff committed Mar 31, 2023
1 parent 4e9d79d commit 8bf6ce7
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
60 changes: 60 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"version": 5,
"cmakeMinimumRequired": {
"major": 3,
"minor": 24,
"patch": 0
},
"configurePresets": [
{
"name": "base-dev",
"binaryDir": "${sourceDir}/build/${presetName}",
"hidden": true
},
{
"name": "msvc-17",
"inherits": "base-dev",
"displayName": "Visual Studio 2022",
"generator": "Visual Studio 17 2022",
"description": "Configure using Visual Studio 17 2022 generator",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"cacheVariables": {
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDLL"
}
}
],
"buildPresets": [
{
"name": "msvc-17-debug",
"displayName": "Debug",
"description": "Build in Debug",
"configuration": "Debug",
"configurePreset": "msvc-17"
},
{
"name": "msvc-17-minsizerel",
"displayName": "MinSizeRel",
"description": "Build in MinSizeRel",
"configuration": "MinSizeRel",
"configurePreset": "msvc-17"
},
{
"name": "msvc-17-relwithdebinfo",
"displayName": "RelWithDebInfo",
"description": "Build in RelWithDebInfo",
"configuration": "RelWithDebInfo",
"configurePreset": "msvc-17"
},
{
"name": "msvc-17-release",
"displayName": "Release",
"description": "Build in Release",
"configuration": "Release",
"configurePreset": "msvc-17"
}
]
}
4 changes: 4 additions & 0 deletions CMakePresets.json.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
SPDX-FileContributor: Olivier Le Doeuff <olivier.ldff@gmail.com>

SPDX-License-Identifier: MIT OR Apache-2.0

0 comments on commit 8bf6ce7

Please sign in to comment.