Skip to content

Commit

Permalink
CMakeLists.txt: Add comment explaining why -Wno-attributes is used
Browse files Browse the repository at this point in the history
  • Loading branch information
nmeum committed Oct 8, 2019
1 parent 237abcc commit eebf5db
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,14 @@ include(CMakeLists.mke2fs.txt)
# Various C++20 features are used across the codebase, e.g.
# std::string_view.starts_with. Additionally, GNU extension
# (such as typeof) are used occasionally.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 -Wno-attributes")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++2a -Wno-attributes")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++2a")

# Android seems to use various attributes supported by clang but not by
# GCC which causes it to emit lots of warnings. Since these attributes
# don't seem to effect runtime behaviour simply disable the warnings.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-attributes")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")

# Targets which should be installed by `make install`.
install(TARGETS adb fastboot "${ANDROID_MKE2FS_NAME}"
Expand Down

0 comments on commit eebf5db

Please sign in to comment.