Skip to content

Commit

Permalink
enable clang compatible warnings only on clang
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Aug 10, 2023
1 parent 078d87e commit 565f760
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,21 @@ function(set_default_warning_settings target)
-Wmissing-include-dirs
-Wnull-dereference
-Wpointer-arith
-Wshadow-all
-Wshadow
-Wswitch-enum
-Wvla
-Wold-style-cast
-Wnon-gcc
-Wgnu
-Wc++17-compat-pedantic
)

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") # match both "Clang" and "AppleClang"
target_compile_options(${target} PRIVATE
-Wc++17-compat-pedantic
-Wshadow-all
-Wnon-gcc
-Wgnu
)
endif()

# Disabled warnings
# arrow has a bunch of unused parameters in its headers.
target_compile_options(${target} PRIVATE -Wno-unused-parameter)
Expand Down

0 comments on commit 565f760

Please sign in to comment.