Skip to content

Commit

Permalink
build: disable shadow warnings on AppleClang
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Oct 23, 2024
1 parent a91d6f7 commit e908698
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,13 @@ project_options(ENABLE_CACHE ENABLE_COMPILE_COMMANDS_SYMLINK)
file(GLOB_RECURSE SOURCES "./src/*.cc")
add_library(addon SHARED ${SOURCES})

if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU
OR CMAKE_CXX_COMPILER_ID STREQUAL Clang
OR CMAKE_CXX_COMPILER_ID STREQUAL AppleClang)
target_compile_options(project_warnings INTERFACE "-Wno-shadow")
endif()
target_link_libraries(addon PRIVATE project_options project_warnings)


if(ZMQ_DRAFT)
target_compile_definitions(addon PRIVATE ZMQ_BUILD_DRAFT_API)
endif()
Expand Down

0 comments on commit e908698

Please sign in to comment.