-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakePresets.json
More file actions
60 lines (58 loc) · 3.03 KB
/
Copy pathCMakePresets.json
File metadata and controls
60 lines (58 loc) · 3.03 KB
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
{
"version": 3,
"configurePresets": [
{
"name": "base",
"hidden": true,
"description": "Shared settings inherited by all presets",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_CXX_STANDARD": { "type": "STRING", "value": "23" },
"CMAKE_CXX_STANDARD_REQUIRED": { "type": "BOOL", "value": "ON" },
"CMAKE_CXX_EXTENSIONS": { "type": "BOOL", "value": "OFF" },
"_comment_compiler": "Pin the Spack GCC 15 toolchain. The Debian system compiler (/usr/bin/c++, GCC 12.2) lacks the C++23 features the Wire-Cell/phlex headers require (std::forward_like, std::ranges::to, template-body static_assert). CMake caches the compiler on first configure, so it MUST be set here to avoid silently pinning GCC 12. gcc@15 is deliberately NOT in the Spack view (a compiler in the app view drags in a gcc12-bootstrap subtree that duplicates/collides on zstd, zlib, etc.), so resolve it from the store via env vars set in .envrc: export CC=\"$(spack -e wcph location -i gcc@15)/bin/gcc\"; export CXX=\"$(spack -e wcph location -i gcc@15)/bin/g++\". Using $env{...} keeps this robust to gcc rebuilds (no hard-coded store hash).",
"CMAKE_C_COMPILER": { "type": "FILEPATH", "value": "$env{CC}" },
"CMAKE_CXX_COMPILER": { "type": "FILEPATH", "value": "$env{CXX}" },
"_comment_prefix": "The Spack view provides Arrow, WireCell, Boost, TBB, etc.",
"CMAKE_PREFIX_PATH": { "type": "PATH", "value": "/devel/ddm/local" }
}
},
{
"name": "default",
"displayName": "Default (optimized with debug symbols)",
"description": "RelWithDebInfo: -O2 optimisation, full debug symbols. Good for day-to-day development and profiling.",
"inherits": "base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": { "type": "STRING", "value": "RelWithDebInfo" }
}
},
{
"name": "stripped",
"displayName": "Stripped (optimized, no debug symbols)",
"description": "Release: -O2 optimisation, no debug symbols. Use for production / installation.",
"inherits": "base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": { "type": "STRING", "value": "Release" }
}
},
{
"name": "debug",
"displayName": "Debug (unoptimized with debug symbols)",
"description": "Debug: -O0, full debug symbols. Use when stepping through code in a debugger.",
"inherits": "base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": { "type": "STRING", "value": "Debug" }
}
}
],
"buildPresets": [
{ "name": "default", "configurePreset": "default" },
{ "name": "stripped", "configurePreset": "stripped" },
{ "name": "debug", "configurePreset": "debug" }
],
"testPresets": [
{ "name": "default", "configurePreset": "default", "output": { "outputOnFailure": true } },
{ "name": "stripped", "configurePreset": "stripped", "output": { "outputOnFailure": true } },
{ "name": "debug", "configurePreset": "debug", "output": { "outputOnFailure": true } }
]
}