Skip to content

Commit 71990cb

Browse files
committed
Proposed CMakePreset.json cleanup
- Now uses config name for file inside build automatically - Hides non Windows on Windows OS - Hides Windows on non Windows os
1 parent 468d611 commit 71990cb

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

‎CMakePresets.json‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
"configurePresets": [
44
{
55
"name": "dev",
6-
"displayName": "Developer build (local machine)",
6+
"displayName": "Developer build (Linux/macOS)",
77
"description": "RelWithDebInfo, native tuning, compile-commands for tooling",
8-
"binaryDir": "${sourceDir}/build/dev",
8+
"binaryDir": "${sourceDir}/build/${presetName}",
9+
"condition": {
10+
"type": "notEquals",
11+
"lhs": "${hostSystemName}",
12+
"rhs": "Windows"
13+
},
914
"cacheVariables": {
1015
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
1116
"CMAKE_CXX_FLAGS": "-march=native",
@@ -14,16 +19,15 @@
1419
},
1520
{
1621
"name": "dev-msvc",
17-
"displayName": "Developer build (MSVC)",
22+
"displayName": "Developer build (Windows/MSVC)",
1823
"description": "RelWithDebInfo with AVX2, compile-commands for tooling",
19-
"binaryDir": "${sourceDir}/build/dev",
24+
"binaryDir": "${sourceDir}/build/${presetName}",
2025
"condition": {
2126
"type": "equals",
2227
"lhs": "${hostSystemName}",
2328
"rhs": "Windows"
2429
},
2530
"cacheVariables": {
26-
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
2731
"CMAKE_CXX_FLAGS": "/arch:AVX2",
2832
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
2933
}
@@ -32,9 +36,10 @@
3236
"name": "ci",
3337
"displayName": "CI build",
3438
"description": "Release build without machine-specific tuning",
35-
"binaryDir": "${sourceDir}/build/ci",
39+
"binaryDir": "${sourceDir}/build/${presetName}",
3640
"cacheVariables": {
37-
"CMAKE_BUILD_TYPE": "Release"
41+
"CMAKE_BUILD_TYPE": "Release",
42+
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
3843
}
3944
}
4045
],
@@ -50,7 +55,8 @@
5055
},
5156
{
5257
"name": "ci",
53-
"configurePreset": "ci"
58+
"configurePreset": "ci",
59+
"configuration": "Release"
5460
}
5561
]
56-
}
62+
}

0 commit comments

Comments
 (0)