Skip to content

Commit

Permalink
CMake: Warnings on AppleClang (#1496)
Browse files Browse the repository at this point in the history
Duplicate from Clang, so our AppleClang based developers
get a nice set of warnings that we enforce as well.
  • Loading branch information
ax3l authored Aug 9, 2023
1 parent bab1d35 commit 3c063e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,8 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# /usr/lib/llvm-6.0/lib/clang/6.0.0/lib/linux/libclang_rt.ubsan_minimal-x86_64.so
# at runtime when used with symbol-hidden code (e.g. pybind11 module)

set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wsign-compare ${CMAKE_CXX_FLAGS}")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wsign-compare ${CMAKE_CXX_FLAGS}")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
set(CMAKE_CXX_FLAGS "-w3 -wd193,383,1572 ${CMAKE_CXX_FLAGS}")
Expand Down

0 comments on commit 3c063e8

Please sign in to comment.