Skip to content

Commit e908698

Browse files
committed
build: disable shadow warnings on AppleClang
1 parent a91d6f7 commit e908698

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,13 @@ project_options(ENABLE_CACHE ENABLE_COMPILE_COMMANDS_SYMLINK)
102102
file(GLOB_RECURSE SOURCES "./src/*.cc")
103103
add_library(addon SHARED ${SOURCES})
104104

105-
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
105+
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU
106+
OR CMAKE_CXX_COMPILER_ID STREQUAL Clang
107+
OR CMAKE_CXX_COMPILER_ID STREQUAL AppleClang)
106108
target_compile_options(project_warnings INTERFACE "-Wno-shadow")
107109
endif()
108110
target_link_libraries(addon PRIVATE project_options project_warnings)
109111

110-
111112
if(ZMQ_DRAFT)
112113
target_compile_definitions(addon PRIVATE ZMQ_BUILD_DRAFT_API)
113114
endif()

0 commit comments

Comments
 (0)