Skip to content

Commit 08272b3

Browse files
authored
disabled -Wpoison-system-directories AppleClang warnings until version 15 (#7785)
``` error: include location '/usr/local/include' is unsafe for cross-compilation [-Werror,-Wpoison-system-directories] ^ ```
1 parent 5c5b978 commit 08272b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmake/compileroptions.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
100100
add_compile_options(-gdwarf-4)
101101
endif()
102102

103+
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
104+
add_compile_options(-Wno-poison-system-directories)
105+
endif()
106+
103107
if(USE_LIBCXX)
104108
add_compile_options(-stdlib=libc++)
105109
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lc++")

0 commit comments

Comments
 (0)