Skip to content

Commit 941b82f

Browse files
committed
Add clang preset
1 parent 6e9f25c commit 941b82f

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

CMakePresets.json

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22
"version": 10,
33
"configurePresets": [
44
{
5-
"name": "ci-gcc",
6-
"displayName": "CI config using GNU C compiler",
5+
"name": "ci-default",
6+
"displayName": "Default CI config",
77
"cacheVariables": {
8-
"ENABLE_WERROR": "ON",
9-
"ENABLE_ASAN": "ON",
10-
"ENABLE_UBSAN": "ON",
118
"ENABLE_BDB_RO": "ON",
129
"WITH_FSVERITY": "ON",
1310
"WITH_IMAEVM": "ON",
@@ -19,6 +16,28 @@
1916
"CFLAGS": "-Og -g",
2017
"CXXFLAGS": "-Og -g"
2118
}
19+
},
20+
{
21+
"name": "ci-gcc",
22+
"inherits": "ci-default",
23+
"displayName": "GNU C based CI config",
24+
"cacheVariables": {
25+
"ENABLE_WERROR": "ON",
26+
"ENABLE_ASAN": "ON",
27+
"ENABLE_UBSAN": "ON"
28+
}
29+
},
30+
{
31+
"name": "ci-clang",
32+
"inherits": "ci-default",
33+
"displayName": "Clang based CI config",
34+
"cacheVariables": {
35+
"CMAKE_C_COMPILER": "clang",
36+
"CMAKE_CXX_COMPILER": "clang++",
37+
"ENABLE_WERROR": "OFF",
38+
"ENABLE_ASAN": "OFF",
39+
"ENABLE_UBSAN": "OFF"
40+
}
2241
}
2342
]
2443
}

tests/Dockerfile.fedora

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,13 @@ WORKDIR /
9393
CMD /bin/bash
9494

9595
FROM base AS full
96+
ARG CMAKE_PRESET=ci-gcc
9697

9798
WORKDIR /srv/rpm
9899
COPY . .
99100

100101
WORKDIR /srv/build
101-
RUN cmake --preset ci-gcc ../rpm
102+
RUN cmake --preset ${CMAKE_PRESET} ../rpm
102103
RUN make -j$(nproc) tree
103104

104105
RUN rm -rf /srv/{rpm,build}

0 commit comments

Comments
 (0)