Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Add a CMakePresets.json for msvc that handle Debug build with sucess #498

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"version": 5,
"configurePresets": [
{
"name": "common",
"binaryDir": "${sourceDir}/build/${presetName}",
"hidden": true,
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": true
}
},
{
"name": "qt6",
"hidden": true,
"cacheVariables": {
"USE_QT5": false
}
},
{
"name": "qt5",
"hidden": true,
"cacheVariables": {
"USE_QT5": true
}
},
{
"name": "ninja",
"hidden": true,
"condition": {
"type": "notEquals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "ninja-multi",
"displayName": "Ninja",
"description": "Default build using Ninja Multi-Config generator",
"generator": "Ninja Multi-Config",
"inherits": ["common", "ninja", "qt6"]
},
{
"name": "msvc",
"hidden": true,
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"cacheVariables": {
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDLL"
ahayzen-kdab marked this conversation as resolved.
Show resolved Hide resolved
}
},
{
"name": "msvc-17",
"inherits": ["common", "msvc", "qt6"],
"displayName": "Visual Studio 2022",
"generator": "Visual Studio 17 2022",
"description": "Configure using Visual Studio 17 2022 generator"
}
],
"buildPresets": [
{
"name": "build-debug",
"configuration": "Debug",
"hidden": true
},
{
"name": "build-relwithdebinfo",
"configuration": "RelWithDebInfo",
"hidden": true
},
{
"name": "build-release",
"configuration": "Release",
"hidden": true
},
{
"name": "ninja-multi-debug",
"configurePreset": "ninja-multi",
"inherits": "build-debug"
},
{
"name": "ninja-multi-relwithdebinfo",
"configurePreset": "ninja-multi",
"inherits": "build-relwithdebinfo"
},
{
"name": "ninja-multi-release",
"configurePreset": "ninja-multi",
"inherits": "build-release"
},
{
"name": "msvc-17-debug",
"configurePreset": "msvc-17",
"inherits": "build-debug"
},
{
"name": "msvc-17-relwithdebinfo",
"configurePreset": "msvc-17",
"inherits": "build-relwithdebinfo"
},
{
"name": "msvc-17-release",
"configurePreset": "msvc-17",
"inherits": "build-release"
}
]
}
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