Skip to content

Commit 2aa94d0

Browse files
committed
Disable pedantic compilation for CMake 4.0.0 and AppleClang 15.0
1 parent e6d5699 commit 2aa94d0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: CMakeLists.txt

+8
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ endif()
7070

7171
find_package(Threads)
7272

73+
# for Apple clang 15 under cmake 4.0.0, disable pedantic warnings explicitly as it fails to treat boost properly as
74+
# system library, warnings propagate
75+
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin" AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
76+
if (CMAKE_VERSION VERSION_EQUAL "4.0.0" AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "15.0")
77+
set(PEDANTIC OFF)
78+
endif()
79+
endif()
80+
7381
if(NOT PEDANTIC)
7482
message(WARNING "-- Pedantic build flags turned off. Warnings will not make compilation fail. This is NOT recommended in development builds.")
7583
endif()

0 commit comments

Comments
 (0)