Skip to content

Commit

Permalink
Ignore -Wattribute warnings for GCC and Clang
Browse files Browse the repository at this point in the history
  • Loading branch information
techbech committed Oct 9, 2023
1 parent 0025086 commit 340b69f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ target_compile_features(sw_protobuf PUBLIC cxx_std_17)
target_link_libraries(sw_protobuf PUBLIC sw_protobuf_abseil sw_protobuf_utf8_range)
target_include_directories(sw_protobuf PUBLIC ${STEINWURF_RESOLVE}/protobuf-source/src)

# Ignore -Wattribute warnings for GCC and Clang
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_compile_options(sw_protobuf PRIVATE -Wno-attributes)
endif ()

add_library(steinwurf::protobuf ALIAS sw_protobuf)

# Is top level project?
Expand Down
2 changes: 1 addition & 1 deletion NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ every change, see the Git log.

Latest
------
* tbd
* Patch: Ignore -Wattribute warnings for GCC and Clang.

2.0.5
-----
Expand Down

0 comments on commit 340b69f

Please sign in to comment.