-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakePresets.json
105 lines (105 loc) · 3.72 KB
/
CMakePresets.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 28,
"patch": 0
},
"configurePresets": [
{
"name": "clang_compiler",
"hidden": true,
"cacheVariables": {
"CMAKE_C_COMPILER": "/usr/bin/clang-17",
"CMAKE_CXX_COMPILER": "/usr/bin/clang++-17"
}
},
{
"name": "emsdk_compiler",
"hidden": true,
"cacheVariables": {
"CMAKE_C_COMPILER": "$penv{EMSDK}/upstream/emscripten/emcc",
"CMAKE_CXX_COMPILER": "$penv{EMSDK}/upstream/emscripten/em++"
}
},
{
"name": "qt_env",
"hidden": true,
"environment": {
"QT_ROOT": "$penv{QT_ROOT}",
"QT_VERSION": "$penv{QT_VERSION}",
"QT_VERSION_ROOT": "$env{QT_ROOT}/$env{QT_VERSION}"
}
},
{
"name": "release_build",
"hidden": true,
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
},
{
"name": "debug_build",
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_CXX_FLAGS_INIT": "-DQT_QML_DEBUG"
}
},
{ "name": "test_on", "hidden": true, "cacheVariables": { "BUILD_TESTING": "ON" } },
{ "name": "test_off", "hidden": true, "cacheVariables": { "BUILD_TESTING": "OFF" } },
{
"name": "default",
"hidden": true,
"generator": "Ninja",
"warnings": {
"dev": true,
"deprecated": true,
"uninitialized": true,
"unusedCli": true,
"systemVars": false
},
"errors": { "deprecated": true },
"environment": { "CONAN_PATH": "$env{HOME}/.local/bin" },
"cacheVariables": {
"CMAKE_CXX_FLAGS": "-Werror -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wcast-qual -Wformat=2 -Wundef -Wcast-align -Wunused -Wdouble-promotion -Wimplicit-fallthrough -Wextra-semi -Woverloaded-virtual -Wnon-virtual-dtor -Wold-style-cast -Wno-gnu-zero-variadic-macro-arguments"
}
},
{
"name": "desktop_dev",
"displayName": "Desktop dev build",
"inherits": ["default", "qt_env", "clang_compiler", "debug_build", "test_on"],
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_PREFIX_PATH": "$env{CONAN_PATH};$env{QT_VERSION_ROOT}/gcc_64;${sourceDir}/build/${presetName}/conan-dependencies"
}
},
{
"name": "desktop_release",
"displayName": "Desktop release build",
"inherits": ["default", "qt_env", "clang_compiler", "release_build", "test_on"],
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_PREFIX_PATH": "$env{CONAN_PATH};$env{QT_VERSION_ROOT}/gcc_64;${sourceDir}/build/${presetName}/conan-dependencies"
}
},
{
"name": "wasm_release",
"displayName": "WebAssembly release build",
"inherits": ["default", "qt_env", "emsdk_compiler", "release_build", "test_off"],
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"QT_HOST_PATH": "$env{QT_VERSION_ROOT}/gcc_64",
"CMAKE_TOOLCHAIN_FILE": "$env{QT_VERSION_ROOT}/wasm_singlethread/lib/cmake/Qt6/qt.toolchain.cmake",
"CMAKE_PREFIX_PATH": "$env{CONAN_PATH};$env{QT_VERSION_ROOT}/wasm_singlethread;${sourceDir}/build/${presetName}/conan-dependencies"
}
}
],
"buildPresets": [
{ "name": "desktop_dev", "configurePreset": "desktop_dev", "targets": "all" },
{ "name": "desktop_release", "configurePreset": "desktop_release", "targets": "all" },
{ "name": "wasm_release", "configurePreset": "wasm_release", "targets": "all" }
],
"testPresets": [
{ "name": "desktop_dev", "configurePreset": "desktop_dev" },
{ "name": "desktop_release", "configurePreset": "desktop_release" }
]
}