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>: