Skip to content

Commit c759460

Browse files
authored
Adds Intel oneAPI and GCC Linux CMake presets (#2218)
* Adds GCC presets (cloned from clang ones) * Adds Intel presets * Moves compiler flags to relevant preset to avoid CMake warnings * Adds CMAKE_BUILD_WITH_INSTALL_RPATH to Intel presets
1 parent 9ebb61d commit c759460

File tree

1 file changed

+126
-7
lines changed

1 file changed

+126
-7
lines changed

enzyme/CMakePresets.json

Lines changed: 126 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,34 +49,117 @@
4949
"cacheVariables": {
5050
"CMAKE_C_COMPILER": "clang",
5151
"CMAKE_CXX_COMPILER": "clang++",
52-
"CMAKE_CXX_FLAGS": "-Wall -fno-rtti -Werror=unused-variable -Werror=dangling-else -Werror=unused-but-set-variable -Werror=return-type -Werror=nonnull -Werror=unused-result -Werror=reorder -Werror=switch",
53-
"CMAKE_CXX_FLAGS_DEBUG": "-O0 -g -ggdb -fno-omit-frame-pointer",
54-
"CMAKE_CXX_FLAGS_RELEASE": "-O2",
55-
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": "-O2 -g -ggdb"
52+
"CMAKE_CXX_FLAGS": "-Wall -fno-rtti -Werror=unused-variable -Werror=dangling-else -Werror=unused-but-set-variable -Werror=return-type -Werror=nonnull -Werror=unused-result -Werror=reorder -Werror=switch"
5653
}
5754
},
5855
{
5956
"name": "x64-linux-clang-debug",
6057
"displayName": "Clang x64 Linux Debug",
6158
"inherits": "x64-linux-clang",
6259
"cacheVariables": {
63-
"CMAKE_BUILD_TYPE": "Debug"
60+
"CMAKE_BUILD_TYPE": "Debug",
61+
"CMAKE_CXX_FLAGS_DEBUG": "-O0 -g -ggdb -fno-omit-frame-pointer"
6462
}
6563
},
6664
{
6765
"name": "x64-linux-clang-release",
6866
"displayName": "Clang x64 Linux Release",
6967
"inherits": "x64-linux-clang",
7068
"cacheVariables": {
71-
"CMAKE_BUILD_TYPE": "Release"
69+
"CMAKE_BUILD_TYPE": "Release",
70+
"CMAKE_CXX_FLAGS_RELEASE": "-O2"
7271
}
7372
},
7473
{
7574
"name": "x64-linux-clang-release-with-debug-info",
7675
"displayName": "Clang x64 Linux Release with Debug Info",
7776
"inherits": "x64-linux-clang",
7877
"cacheVariables": {
79-
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
78+
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
79+
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": "-O2 -g -ggdb"
80+
}
81+
},
82+
{
83+
"name": "x64-linux-gcc",
84+
"description": "Base preset for Linux development using GNU compilers.",
85+
"hidden": true,
86+
"inherits": [
87+
"config-base-x64",
88+
"config-base-linux"
89+
],
90+
"cacheVariables": {
91+
"CMAKE_C_COMPILER": "gcc",
92+
"CMAKE_CXX_COMPILER": "g++",
93+
"CMAKE_CXX_FLAGS": "-Wall -fno-rtti -Werror=unused-variable -Werror=dangling-else -Werror=unused-but-set-variable -Werror=return-type -Werror=nonnull -Werror=unused-result -Werror=reorder -Werror=switch -Wno-comment"
94+
}
95+
},
96+
{
97+
"name": "x64-linux-gcc-debug",
98+
"displayName": "GCC x64 Linux Debug",
99+
"inherits": "x64-linux-gcc",
100+
"cacheVariables": {
101+
"CMAKE_BUILD_TYPE": "Debug",
102+
"CMAKE_CXX_FLAGS_DEBUG": "-O0 -g -ggdb -fno-omit-frame-pointer"
103+
}
104+
},
105+
{
106+
"name": "x64-linux-gcc-release",
107+
"displayName": "GCC x64 Linux Release",
108+
"inherits": "x64-linux-gcc",
109+
"cacheVariables": {
110+
"CMAKE_BUILD_TYPE": "Release",
111+
"CMAKE_CXX_FLAGS_RELEASE": "-O2"
112+
}
113+
},
114+
{
115+
"name": "x64-linux-gcc-release-with-debug-info",
116+
"displayName": "GCC x64 Linux Release with Debug Info",
117+
"inherits": "x64-linux-gcc",
118+
"cacheVariables": {
119+
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
120+
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": "-O2 -g -ggdb"
121+
}
122+
},
123+
{
124+
"name": "x64-linux-intel",
125+
"description": "Base preset for Linux development using Intel oneAPI compilers.",
126+
"hidden": true,
127+
"inherits": [
128+
"config-base-x64",
129+
"config-base-linux"
130+
],
131+
"cacheVariables": {
132+
"CMAKE_C_COMPILER": "icx",
133+
"CMAKE_CXX_COMPILER": "icpx",
134+
"CMAKE_CXX_FLAGS": "-Wall -fno-rtti -Werror=unused-variable -Werror=dangling-else -Werror=unused-but-set-variable -Werror=return-type -Werror=nonnull -Werror=unused-result -Werror=reorder -Werror=switch",
135+
"CMAKE_BUILD_WITH_INSTALL_RPATH": "ON"
136+
}
137+
},
138+
{
139+
"name": "x64-linux-intel-debug",
140+
"displayName": "Intel x64 Linux Debug",
141+
"inherits": "x64-linux-intel",
142+
"cacheVariables": {
143+
"CMAKE_BUILD_TYPE": "Debug",
144+
"CMAKE_CXX_FLAGS_DEBUG": "-O0 -g -ggdb -fno-omit-frame-pointer"
145+
}
146+
},
147+
{
148+
"name": "x64-linux-intel-release",
149+
"displayName": "Intel x64 Linux Release",
150+
"inherits": "x64-linux-intel",
151+
"cacheVariables": {
152+
"CMAKE_BUILD_TYPE": "Release",
153+
"CMAKE_CXX_FLAGS_RELEASE": "-O2"
154+
}
155+
},
156+
{
157+
"name": "x64-linux-intel-release-with-debug-info",
158+
"displayName": "Intel x64 Linux Release with Debug Info",
159+
"inherits": "x64-linux-intel",
160+
"cacheVariables": {
161+
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
162+
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": "-O2 -g -ggdb"
80163
}
81164
}
82165
],
@@ -98,6 +181,42 @@
98181
"displayName": "Clang x64 Linux Release with Debug Info",
99182
"description": "Builds the project using Clang on Linux in Release configuration with debug info.",
100183
"configurePreset": "x64-linux-clang-release-with-debug-info"
184+
},
185+
{
186+
"name": "x64-linux-gcc-debug",
187+
"displayName": "GCC x64 Linux Debug",
188+
"description": "Builds the project using GCC on Linux in Debug configuration.",
189+
"configurePreset": "x64-linux-gcc-debug"
190+
},
191+
{
192+
"name": "x64-linux-gcc-release",
193+
"displayName": "GCC x64 Linux Release",
194+
"description": "Builds the project using GCC on Linux in Release configuration.",
195+
"configurePreset": "x64-linux-gcc-release"
196+
},
197+
{
198+
"name": "x64-linux-gcc-release-with-debug-info",
199+
"displayName": "GCC x64 Linux Release with Debug Info",
200+
"description": "Builds the project using GCC on Linux in Release configuration with debug info.",
201+
"configurePreset": "x64-linux-gcc-release-with-debug-info"
202+
},
203+
{
204+
"name": "x64-linux-intel-debug",
205+
"displayName": "Intel x64 Linux Debug",
206+
"description": "Builds the project using Intel oneAPI compilers on Linux in Debug configuration.",
207+
"configurePreset": "x64-linux-intel-debug"
208+
},
209+
{
210+
"name": "x64-linux-intel-release",
211+
"displayName": "Intel x64 Linux Release",
212+
"description": "Builds the project using Intel oneAPI compilers on Linux in Release configuration.",
213+
"configurePreset": "x64-linux-intel-release"
214+
},
215+
{
216+
"name": "x64-linux-intel-release-with-debug-info",
217+
"displayName": "Intel x64 Linux Release with Debug Info",
218+
"description": "Builds the project using Intel oneAPI compilers on Linux in Release configuration with debug info.",
219+
"configurePreset": "x64-linux-intel-release-with-debug-info"
101220
}
102221
]
103222
}

0 commit comments

Comments
 (0)