@@ -18,7 +18,7 @@ execute_process(COMMAND ${CLANG_TOOL} --version OUTPUT_VARIABLE CLANG_TOOL_VERSI
18
18
string (REGEX MATCH "[0-9]+(\\ .[0-9]+)+" CLANG_TOOL_VERSION "${CLANG_TOOL_VERSION} " )
19
19
message (STATUS "🔖 Clang ${CLANG_TOOL_VERSION} (${CLANG_TOOL} )" )
20
20
21
- find_program (CLANG_TIDY_TOOL NAMES clang-tidy-17 clang-tidy-16 clang-tidy-15 clang-tidy-14 clang-tidy-13 clang-tidy-12 clang-tidy-11 clang-tidy)
21
+ find_program (CLANG_TIDY_TOOL NAMES clang-tidy-20 clang-tidy-19 clang-tidy-18 clang-tidy- 17 clang-tidy-16 clang-tidy-15 clang-tidy-14 clang-tidy-13 clang-tidy-12 clang-tidy-11 clang-tidy)
22
22
execute_process (COMMAND ${CLANG_TIDY_TOOL} --version OUTPUT_VARIABLE CLANG_TIDY_TOOL_VERSION ERROR_VARIABLE CLANG_TIDY_TOOL_VERSION)
23
23
string (REGEX MATCH "[0-9]+(\\ .[0-9]+)+" CLANG_TIDY_TOOL_VERSION "${CLANG_TIDY_TOOL_VERSION} " )
24
24
message (STATUS "🔖 Clang-Tidy ${CLANG_TIDY_TOOL_VERSION} (${CLANG_TIDY_TOOL} )" )
@@ -30,12 +30,12 @@ execute_process(COMMAND ${CPPCHECK_TOOL} --version OUTPUT_VARIABLE CPPCHECK_TOOL
30
30
string (REGEX MATCH "[0-9]+(\\ .[0-9]+)+" CPPCHECK_TOOL_VERSION "${CPPCHECK_TOOL_VERSION} " )
31
31
message (STATUS "🔖 Cppcheck ${CPPCHECK_TOOL_VERSION} (${CPPCHECK_TOOL} )" )
32
32
33
- find_program (GCC_TOOL NAMES g++-latest g++-HEAD g++-13 g++-12 g++-11 g++-10)
33
+ find_program (GCC_TOOL NAMES g++-latest g++-HEAD g++ g++-15 g++-14 g++ -13 g++-12 g++-11 g++-10)
34
34
execute_process (COMMAND ${GCC_TOOL} --version OUTPUT_VARIABLE GCC_TOOL_VERSION ERROR_VARIABLE GCC_TOOL_VERSION)
35
35
string (REGEX MATCH "[0-9]+(\\ .[0-9]+)+" GCC_TOOL_VERSION "${GCC_TOOL_VERSION} " )
36
36
message (STATUS "🔖 GCC ${GCC_TOOL_VERSION} (${GCC_TOOL} )" )
37
37
38
- find_program (GCOV_TOOL NAMES gcov-HEAD gcov-11 gcov-10 gcov)
38
+ find_program (GCOV_TOOL NAMES gcov-HEAD gcov-15 gcov-14 gcov-13 gcov-12 gcov- 11 gcov-10 gcov)
39
39
execute_process (COMMAND ${GCOV_TOOL} --version OUTPUT_VARIABLE GCOV_TOOL_VERSION ERROR_VARIABLE GCOV_TOOL_VERSION)
40
40
string (REGEX MATCH "[0-9]+(\\ .[0-9]+)+" GCOV_TOOL_VERSION "${GCOV_TOOL_VERSION} " )
41
41
message (STATUS "🔖 GCOV ${GCOV_TOOL_VERSION} (${GCOV_TOOL} )" )
@@ -96,7 +96,6 @@ file(GLOB_RECURSE SRC_FILES ${PROJECT_SOURCE_DIR}/include/nlohmann/*.hpp)
96
96
# -Wno-padded We do not care about padding warnings.
97
97
# -Wno-covered-switch-default All switches list all cases and a default case.
98
98
# -Wno-unsafe-buffer-usage Otherwise Doctest would not compile.
99
- # -Wreserved-identifier See https://github.com/onqtam/doctest/issues/536.
100
99
101
100
set (CLANG_CXXFLAGS
102
101
-Werror
@@ -108,15 +107,15 @@ set(CLANG_CXXFLAGS
108
107
-Wno-padded
109
108
-Wno-covered-switch-default
110
109
-Wno-unsafe-buffer-usage
111
- -Wno-reserved-identifier
112
110
)
113
111
114
- # Warning flags determined for GCC 13.0 (experimental) with https://github.com/nlohmann/gcc_flags:
112
+ # Warning flags determined for GCC 14.2.0 with https://github.com/nlohmann/gcc_flags:
115
113
# Ignored GCC warnings:
116
114
# -Wno-abi-tag We do not care about ABI tags.
117
115
# -Wno-aggregate-return The library uses aggregate returns.
118
116
# -Wno-long-long The library uses the long long type to interface with system functions.
119
117
# -Wno-namespaces The library uses namespaces.
118
+ # -Wno-nrvo Doctest triggers this warning.
120
119
# -Wno-padded We do not care about padding warnings.
121
120
# -Wno-system-headers We do not care about warnings in system headers.
122
121
# -Wno-templates The library uses templates.
@@ -135,28 +134,49 @@ set(GCC_CXXFLAGS
135
134
-Waggressive-loop-optimizations
136
135
-Waligned-new=all
137
136
-Wall
137
+ -Walloc-size
138
138
-Walloc-zero
139
139
-Walloca
140
+ -Wanalyzer-allocation-size
141
+ -Wanalyzer-deref-before-check
140
142
-Wanalyzer-double-fclose
141
143
-Wanalyzer-double-free
142
144
-Wanalyzer-exposure-through-output -file
145
+ -Wanalyzer-exposure-through-uninit-copy
146
+ -Wanalyzer-fd-access-mode-mismatch
147
+ -Wanalyzer-fd-double-close
148
+ -Wanalyzer-fd-leak
149
+ -Wanalyzer-fd-phase-mismatch
150
+ -Wanalyzer-fd-type -mismatch
151
+ -Wanalyzer-fd-use-after-close
152
+ -Wanalyzer-fd-use-without-check
143
153
-Wanalyzer-file-leak
144
154
-Wanalyzer-free-of-non-heap
155
+ -Wanalyzer-imprecise-fp-arithmetic
156
+ -Wanalyzer-infinite-loop
157
+ -Wanalyzer-infinite-recursion
158
+ -Wanalyzer-jump-through-null
145
159
-Wanalyzer-malloc-leak
146
160
-Wanalyzer-mismatching-deallocation
147
161
-Wanalyzer-null-argument
148
162
-Wanalyzer-null-dereference
163
+ -Wanalyzer-out-of-bounds
164
+ -Wanalyzer-overlapping-buffers
149
165
-Wanalyzer-possible-null-argument
150
166
-Wanalyzer-possible-null-dereference
167
+ -Wanalyzer-putenv-of-auto-var
151
168
-Wanalyzer-shift-count-negative
152
169
-Wanalyzer-shift-count-overflow
153
170
-Wanalyzer-stale-setjmp-buffer
171
+ -Wanalyzer-symbol-too-complex
154
172
-Wanalyzer-tainted-allocation-size
155
173
-Wanalyzer-tainted-array-index
174
+ -Wanalyzer-tainted-assertion
156
175
-Wanalyzer-tainted-divisor
157
176
-Wanalyzer-tainted-offset
158
177
-Wanalyzer-tainted-size
159
178
-Wanalyzer-too-complex
179
+ -Wanalyzer-undefined-behavior-strtok
160
180
-Wanalyzer-unsafe-call-within-signal-handler
161
181
-Wanalyzer-use-after-free
162
182
-Wanalyzer-use-of-pointer-in-stale-stack-frame
@@ -189,30 +209,37 @@ set(GCC_CXXFLAGS
189
209
-Wc++20-compat
190
210
-Wc++20-extensions
191
211
-Wc++23-extensions
212
+ -Wc++26-extensions
192
213
-Wc++2a-compat
214
+ -Wcalloc-transposed-args
193
215
-Wcannot-profile
194
216
-Wcast-align
195
217
-Wcast-align=strict
196
218
-Wcast-function-type
197
219
-Wcast-qual
220
+ -Wcast-user-defined
198
221
-Wcatch-value =3
222
+ -Wchanges-meaning
199
223
-Wchar-subscripts
200
224
-Wclass-conversion
201
225
-Wclass-memaccess
202
226
-Wclobbered
203
227
-Wcomma-subscript
204
228
-Wcomment
205
229
-Wcomments
230
+ -Wcomplain-wrong-lang
206
231
-Wconditionally-supported
207
232
-Wconversion
208
233
-Wconversion-null
209
234
-Wcoverage-invalid-line-number
210
235
-Wcoverage-mismatch
236
+ -Wcoverage-too-many-conditions
211
237
-Wcpp
212
238
-Wctad-maybe-unsupported
213
239
-Wctor-dtor-privacy
214
240
-Wdangling-else
215
241
-Wdangling-pointer=2
242
+ -Wdangling-reference
216
243
-Wdate-time
217
244
-Wdelete-incomplete
218
245
-Wdelete-non-virtual-dtor
@@ -228,6 +255,7 @@ set(GCC_CXXFLAGS
228
255
-Wduplicated-branches
229
256
-Wduplicated-cond
230
257
-Weffc++
258
+ -Welaborated-enum-base
231
259
-Wempty-body
232
260
-Wendif-labels
233
261
-Wenum-compare
@@ -236,15 +264,24 @@ set(GCC_CXXFLAGS
236
264
-Wexpansion-to-defined
237
265
-Wextra
238
266
-Wextra-semi
267
+ -Wflex-array-member-not -at-end
239
268
-Wfloat-conversion
240
269
-Wfloat-equal
270
+ -Wformat -Wformat-contains-nul
271
+ -Wformat -Wformat-extra-args
272
+ -Wformat -Wformat-nonliteral
273
+ -Wformat -Wformat-security
274
+ -Wformat -Wformat-y2k
275
+ -Wformat -Wformat-zero-length
241
276
-Wformat-diag
242
277
-Wformat-overflow=2
243
278
-Wformat-signedness
244
279
-Wformat-truncation=2
245
280
-Wformat=2
246
281
-Wframe-address
247
282
-Wfree-nonheap-object
283
+ -Wglobal-module
284
+ -Whardened
248
285
-Whsa
249
286
-Wif-not -aligned
250
287
-Wignored-attributes
@@ -259,10 +296,12 @@ set(GCC_CXXFLAGS
259
296
-Wint-in-bool -context
260
297
-Wint-to-pointer-cast
261
298
-Winterference-size
299
+ -Winvalid-constexpr
262
300
-Winvalid-imported -macros
263
301
-Winvalid-memory-model
264
302
-Winvalid-offsetof
265
303
-Winvalid-pch
304
+ -Winvalid-utf8
266
305
-Wliteral-suffix
267
306
-Wlogical-not -parentheses
268
307
-Wlogical-op
@@ -296,14 +335,16 @@ set(GCC_CXXFLAGS
296
335
-Wnonnull
297
336
-Wnonnull-compare
298
337
-Wnormalized=nfkc
338
+ -Wno-nrvo
299
339
-Wnull-dereference
300
340
-Wodr
301
341
-Wold-style-cast
302
342
-Wopenacc-parallelism
343
+ -Wopenmp
303
344
-Wopenmp-simd
304
345
-Woverflow
305
346
-Woverlength-strings
306
- -Woverloaded-virtual
347
+ -Woverloaded-virtual=2
307
348
-Wpacked
308
349
-Wpacked-bitfield-compat
309
350
-Wpacked-not -aligned
@@ -328,6 +369,7 @@ set(GCC_CXXFLAGS
328
369
-Wreturn-local-addr
329
370
-Wreturn-type
330
371
-Wscalar-storage-order
372
+ -Wself-move
331
373
-Wsequence-point
332
374
-Wshadow=compatible-local
333
375
-Wshadow=global
@@ -347,7 +389,7 @@ set(GCC_CXXFLAGS
347
389
-Wstack-protector
348
390
-Wstrict-aliasing=3
349
391
-Wstrict-null-sentinel
350
- -Wno-strict -overflow
392
+ -Wstrict -overflow
351
393
-Wstring-compare
352
394
-Wstringop-overflow=4
353
395
-Wstringop-overread
@@ -359,6 +401,7 @@ set(GCC_CXXFLAGS
359
401
-Wsuggest-attribute=malloc
360
402
-Wsuggest-attribute=noreturn
361
403
-Wsuggest-attribute=pure
404
+ -Wsuggest-attribute=returns_nonnull
362
405
-Wsuggest-final-methods
363
406
-Wsuggest-final-types
364
407
-Wsuggest-override
@@ -380,6 +423,7 @@ set(GCC_CXXFLAGS
380
423
-Wtsan
381
424
-Wtype-limits
382
425
-Wundef
426
+ -Wunicode
383
427
-Wuninitialized
384
428
-Wunknown-pragmas
385
429
-Wunreachable-code
@@ -409,6 +453,7 @@ set(GCC_CXXFLAGS
409
453
-Wvolatile
410
454
-Wvolatile-register-var
411
455
-Wwrite-strings
456
+ -Wxor-used-as-pow
412
457
-Wzero-as-null-pointer-constant
413
458
-Wzero-length -bounds
414
459
)
0 commit comments