Only use -Wgnu-empty-initializer on Clang and not GCC.
Broken by ee566eb880.
PiperOrigin-RevId: 517390165
Change-Id: Ibd8ec46647873050899cffe435e3f5c293279aae
This commit is contained in:
committed by
Copybara-Service
parent
ee566eb880
commit
08027b4e43
@@ -93,7 +93,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang
|
||||
-Wno-int-in-bool-context
|
||||
-Wno-sign-compare
|
||||
-Wno-unknown-pragmas
|
||||
-Wgnu-empty-initializer
|
||||
)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
# Set -Wimplicit-fallthrough=5 to only allow fallthrough annotation via __attribute__.
|
||||
@@ -101,6 +100,9 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang
|
||||
-Wno-maybe-uninitialized
|
||||
)
|
||||
endif()
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT MSVC)
|
||||
set(EXTRA_COMPILE_OPTIONS ${EXTRA_COMPILE_OPTIONS} -Wgnu-empty-initializer)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
|
||||
Reference in New Issue
Block a user