From 237e8b71fe74fee974a4d57e92be6ca460c0308e Mon Sep 17 00:00:00 2001 From: Derek Bailey Date: Tue, 23 Aug 2022 23:23:24 -0700 Subject: [PATCH] Moved compiler warnings around (#7471) --- CMakeLists.txt | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a8f7d76bd..93dfc58bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -358,26 +358,33 @@ if(MSVC_LIKE) > ) else() + if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + set(IS_CLANG ON) + else() + set(IS_CLANG OFF) + endif() target_compile_options(ProjectConfig INTERFACE -Wall - -Wno-unknown-warning-option $<$: -Werror # Treat all compiler warnings as errors - # False positive string overflow - # https://github.com/google/flatbuffers/issues/7366 - -Wno-error=stringop-overflow + $<$: + # False positive string overflow + # https://github.com/google/flatbuffers/issues/7366 + -Wno-error=stringop-overflow + > > -pedantic -Wextra -Wno-unused-parameter -Wold-style-cast - -Wimplicit-fallthrough -fsigned-char -Wnon-virtual-dtor - $<$: + # This isn't working for some reason: $<$: + $<$: + -Wno-unknown-warning-option -Wmissing-declarations -Wzero-as-null-pointer-constant $<$,3.8>: