Skip to content

Commit

Permalink
[cmake] Properly suppress comma subscript warning on both clang and gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed Sep 10, 2020
1 parent 9947e47 commit 59c511f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion c++/triqs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ else()
endif()

# Disable warnings about comma expression in array subscript
target_compile_options(triqs PUBLIC -Wno-deprecated-comma-subscript -Wno-unknown-warning-option)
target_compile_options(triqs PUBLIC
$<$<CXX_COMPILER_ID:GNU>:-Wno-comma-subscript>
$<$<CXX_COMPILER_ID:Clang>:-Wno-deprecated-comma-subscript>
$<$<CXX_COMPILER_ID:Clang>:-Wno-unknown-warning-option>
$<$<CXX_COMPILER_ID:AppleClang>:-Wno-deprecated-comma-subscript>
$<$<CXX_COMPILER_ID:AppleClang>:-Wno-unknown-warning-option>
)

# Compile Definitions
option(CHECK_MEMORY "Turn on memory check" OFF)
Expand Down

0 comments on commit 59c511f

Please sign in to comment.