Skip to content

Commit b3d3fe2

Browse files
committed
build: macOS 15
1 parent 1f933bc commit b3d3fe2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

CMakeLists.txt

+13
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,19 @@ set(SOURCES
143143
# @todo remove -DSO_ATTACH_REUSEPORT_CBPF=51
144144
add_compile_options(-DSO_ATTACH_REUSEPORT_CBPF=51)
145145

146+
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
147+
string(REPLACE "." ";" set_version_list ${CMAKE_CXX_COMPILER_VERSION})
148+
list(GET set_version_list 0 major_version)
149+
# Check for Clang version >= 16.0
150+
if (major_version GREATER_EQUAL 16)
151+
message(STATUS "Clang version >= 16.0 detected, enabling '-Wno-invalid-unevaluated-string'.")
152+
# Add the warning option
153+
add_compile_options(-Wno-invalid-unevaluated-string)
154+
else()
155+
message(STATUS "Clang version < 16.0, skipping '-Wno-invalid-unevaluated-string'.")
156+
endif()
157+
endif()
158+
146159
# for lttng, quicer_tp.h
147160
include_directories(c_src)
148161
# for templ files

0 commit comments

Comments
 (0)