Skip to content

Commit 6c39206

Browse files
author
Ayssar
committed
Add CMake presets
1 parent d990032 commit 6c39206

1 file changed

Lines changed: 142 additions & 0 deletions

File tree

CMakePresets.json

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
{
2+
"version": 3,
3+
"cmakeMinimumRequired": { "major": 3, "minor": 19, "patch": 0 },
4+
"configurePresets": [
5+
{
6+
"name": "base",
7+
"hidden": true,
8+
"description": "Common settings shared by all presets",
9+
"binaryDir": "${sourceDir}/build/${presetName}",
10+
"cacheVariables": {
11+
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
12+
"with-python": "ON",
13+
"cythonize-pynest": "ON",
14+
"with-openmp": "ON",
15+
"with-boost": "ON",
16+
"with-ltdl": "ON",
17+
"with-gsl": "ON",
18+
"with-warning": "ON",
19+
"with-modelset": "full",
20+
"with-threaded-timers": "ON",
21+
"target-bits-split": "standard"
22+
}
23+
},
24+
{
25+
"name": "default",
26+
"displayName": "Default",
27+
"description": "Standard build with optimizations (mirrors existing build/ configuration)",
28+
"inherits": "base",
29+
"cacheVariables": {
30+
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/default/install",
31+
"with-optimize": "ON",
32+
"with-debug": "OFF",
33+
"with-mpi": "OFF"
34+
}
35+
},
36+
{
37+
"name": "debug",
38+
"displayName": "Debug",
39+
"description": "Debug build with symbols, no optimization",
40+
"inherits": "base",
41+
"cacheVariables": {
42+
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/debug/install",
43+
"with-optimize": "OFF",
44+
"with-debug": "ON"
45+
}
46+
},
47+
{
48+
"name": "release",
49+
"displayName": "Release",
50+
"description": "Optimized release build (-O3)",
51+
"inherits": "base",
52+
"cacheVariables": {
53+
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/release/install",
54+
"with-optimize": "-O3",
55+
"with-debug": "OFF"
56+
}
57+
},
58+
{
59+
"name": "mpi",
60+
"displayName": "MPI",
61+
"description": "Build with MPI + OpenMP parallelization",
62+
"inherits": "base",
63+
"cacheVariables": {
64+
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/mpi/install",
65+
"with-optimize": "ON",
66+
"with-debug": "OFF",
67+
"with-mpi": "ON"
68+
}
69+
},
70+
{
71+
"name": "mpi-debug",
72+
"displayName": "MPI Debug",
73+
"description": "Debug build with MPI + OpenMP",
74+
"inherits": "base",
75+
"cacheVariables": {
76+
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/mpi-debug/install",
77+
"with-optimize": "OFF",
78+
"with-debug": "ON",
79+
"with-mpi": "ON"
80+
}
81+
},
82+
{
83+
"name": "minimal",
84+
"displayName": "Minimal",
85+
"description": "Minimal build: no Python, no MPI, no optional libraries",
86+
"inherits": "base",
87+
"cacheVariables": {
88+
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/minimal/install",
89+
"with-python": "OFF",
90+
"with-mpi": "OFF",
91+
"with-boost": "OFF",
92+
"with-gsl": "OFF",
93+
"with-readline": "OFF",
94+
"with-ltdl": "OFF",
95+
"with-optimize": "ON",
96+
"with-debug": "OFF"
97+
}
98+
},
99+
{
100+
"name": "docs",
101+
"displayName": "User Documentation",
102+
"description": "Build with user documentation (requires Sphinx and Pandoc)",
103+
"inherits": "default",
104+
"cacheVariables": {
105+
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/docs/install",
106+
"with-userdoc": "ON"
107+
}
108+
}
109+
],
110+
"buildPresets": [
111+
{
112+
"name": "default",
113+
"displayName": "Default",
114+
"configurePreset": "default"
115+
},
116+
{
117+
"name": "debug",
118+
"displayName": "Debug",
119+
"configurePreset": "debug"
120+
},
121+
{
122+
"name": "release",
123+
"displayName": "Release",
124+
"configurePreset": "release"
125+
},
126+
{
127+
"name": "mpi",
128+
"displayName": "MPI",
129+
"configurePreset": "mpi"
130+
},
131+
{
132+
"name": "mpi-debug",
133+
"displayName": "MPI Debug",
134+
"configurePreset": "mpi-debug"
135+
},
136+
{
137+
"name": "minimal",
138+
"displayName": "Minimal",
139+
"configurePreset": "minimal"
140+
}
141+
]
142+
}

0 commit comments

Comments
 (0)