Skip to content

Commit 1d9eb19

Browse files
authored
Proposed CMakePreset.json cleanup (#56)
* 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 * In Clion, this is still required if we do not want to build in Debug
1 parent eaa1ebb commit 1d9eb19

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

CMakePresets.json

Lines changed: 15 additions & 8 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,9 +19,9 @@
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}",
@@ -32,9 +37,10 @@
3237
"name": "ci",
3338
"displayName": "CI build",
3439
"description": "Release build without machine-specific tuning",
35-
"binaryDir": "${sourceDir}/build/ci",
40+
"binaryDir": "${sourceDir}/build/${presetName}",
3641
"cacheVariables": {
37-
"CMAKE_BUILD_TYPE": "Release"
42+
"CMAKE_BUILD_TYPE": "Release",
43+
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
3844
}
3945
}
4046
],
@@ -50,7 +56,8 @@
5056
},
5157
{
5258
"name": "ci",
53-
"configurePreset": "ci"
59+
"configurePreset": "ci",
60+
"configuration": "Release"
5461
}
5562
]
56-
}
63+
}

0 commit comments

Comments
 (0)