Skip to content

Commit e2e9ab3

Browse files
authored
Merge pull request #340 from qzhuyan/dev/william/main-0.1-macOS15
Backport macOS 15 build fix from main branch
2 parents a21112c + 3075947 commit e2e9ab3

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.github/workflows/main.yml

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
matrix:
3030
os:
3131
- macos-14
32+
- macos-15
3233
otp:
3334
- '27'
3435
rebar3:

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)