From 06b55a3d044a9fbbcd97df6e6531cad98dd34ca1 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Sat, 13 Aug 2022 00:12:42 -0700 Subject: [PATCH] Enable -Wpedantic in OSS Android Targets (#34403) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/34403 This change mirrors D38457812 (https://github.com/facebook/react-native/commit/063c2b4668b279ccbca639f98f7a0a5c4d7c5690) which added -Wpedantic to ReactCommon targets, but for the Android build used by OSS. This should ensure contributors see the same warnings locally as the internal build would produce. Changelog: [Android][Changed] - Enable -Wpedantic in OSS Android Targets Reviewed By: cortinico Differential Revision: D38632454 fbshipit-source-id: 19a036ee3f902eb9d47c568aef448af9d8562358 --- ReactCommon/butter/CMakeLists.txt | 4 +++- ReactCommon/callinvoker/CMakeLists.txt | 8 +++++++- ReactCommon/react/bridging/CMakeLists.txt | 9 ++++++++- ReactCommon/react/config/CMakeLists.txt | 2 ++ ReactCommon/react/debug/CMakeLists.txt | 2 ++ ReactCommon/react/nativemodule/core/CMakeLists.txt | 9 ++++++++- .../nativemodule/samples/platform/android/CMakeLists.txt | 9 ++++++++- ReactCommon/react/renderer/animations/CMakeLists.txt | 9 ++++++++- .../react/renderer/attributedstring/CMakeLists.txt | 9 ++++++++- .../react/renderer/componentregistry/CMakeLists.txt | 9 ++++++++- .../renderer/componentregistry/native/CMakeLists.txt | 9 ++++++++- .../react/renderer/components/image/CMakeLists.txt | 9 ++++++++- .../react/renderer/components/modal/CMakeLists.txt | 9 ++++++++- .../react/renderer/components/progressbar/CMakeLists.txt | 9 ++++++++- .../react/renderer/components/root/CMakeLists.txt | 9 ++++++++- .../react/renderer/components/scrollview/CMakeLists.txt | 9 ++++++++- .../react/renderer/components/slider/CMakeLists.txt | 9 ++++++++- .../react/renderer/components/switch/CMakeLists.txt | 2 ++ .../react/renderer/components/text/CMakeLists.txt | 9 ++++++++- .../react/renderer/components/textinput/CMakeLists.txt | 9 ++++++++- .../renderer/components/unimplementedview/CMakeLists.txt | 9 ++++++++- .../react/renderer/components/view/CMakeLists.txt | 9 ++++++++- ReactCommon/react/renderer/core/CMakeLists.txt | 9 ++++++++- ReactCommon/react/renderer/debug/CMakeLists.txt | 9 ++++++++- ReactCommon/react/renderer/graphics/CMakeLists.txt | 9 ++++++++- ReactCommon/react/renderer/imagemanager/CMakeLists.txt | 9 ++++++++- ReactCommon/react/renderer/leakchecker/CMakeLists.txt | 9 ++++++++- ReactCommon/react/renderer/mapbuffer/CMakeLists.txt | 9 ++++++++- ReactCommon/react/renderer/mounting/CMakeLists.txt | 9 ++++++++- .../react/renderer/runtimescheduler/CMakeLists.txt | 9 ++++++++- ReactCommon/react/renderer/scheduler/CMakeLists.txt | 9 ++++++++- ReactCommon/react/renderer/telemetry/CMakeLists.txt | 9 ++++++++- .../react/renderer/templateprocessor/CMakeLists.txt | 9 ++++++++- .../react/renderer/textlayoutmanager/CMakeLists.txt | 9 ++++++++- ReactCommon/react/renderer/uimanager/CMakeLists.txt | 9 ++++++++- ReactCommon/react/utils/CMakeLists.txt | 2 ++ ReactCommon/reactperflogger/CMakeLists.txt | 8 +++++++- ReactCommon/runtimeexecutor/CMakeLists.txt | 8 +++++++- ReactCommon/yoga/CMakeLists.txt | 8 +++++++- 39 files changed, 279 insertions(+), 35 deletions(-) diff --git a/ReactCommon/butter/CMakeLists.txt b/ReactCommon/butter/CMakeLists.txt index f0369712e434b2..2f374d95165168 100644 --- a/ReactCommon/butter/CMakeLists.txt +++ b/ReactCommon/butter/CMakeLists.txt @@ -11,7 +11,9 @@ add_compile_options( -fexceptions -frtti -std=c++17 - -Wall) + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments) add_library(butter INTERFACE) diff --git a/ReactCommon/callinvoker/CMakeLists.txt b/ReactCommon/callinvoker/CMakeLists.txt index 58da1e6a1f0709..f2206d066fb5ca 100644 --- a/ReactCommon/callinvoker/CMakeLists.txt +++ b/ReactCommon/callinvoker/CMakeLists.txt @@ -6,7 +6,13 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall) +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments) add_library(callinvoker INTERFACE) diff --git a/ReactCommon/react/bridging/CMakeLists.txt b/ReactCommon/react/bridging/CMakeLists.txt index 88d3aba2fae641..18eb946077fe68 100644 --- a/ReactCommon/react/bridging/CMakeLists.txt +++ b/ReactCommon/react/bridging/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"ReactNative\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"ReactNative\") file(GLOB react_bridging_SRC CONFIGURE_DEPENDS *.cpp) diff --git a/ReactCommon/react/config/CMakeLists.txt b/ReactCommon/react/config/CMakeLists.txt index fea8855cb9cc78..d6e93d1cde201f 100644 --- a/ReactCommon/react/config/CMakeLists.txt +++ b/ReactCommon/react/config/CMakeLists.txt @@ -11,6 +11,8 @@ add_compile_options( -frtti -std=c++17 -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments -DLOG_TAG=\"Fabric\") file(GLOB react_config_SRC CONFIGURE_DEPENDS *.cpp) diff --git a/ReactCommon/react/debug/CMakeLists.txt b/ReactCommon/react/debug/CMakeLists.txt index c325fcead16bd9..620a1c54392c8c 100644 --- a/ReactCommon/react/debug/CMakeLists.txt +++ b/ReactCommon/react/debug/CMakeLists.txt @@ -11,6 +11,8 @@ add_compile_options( -frtti -std=c++17 -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments -DLOG_TAG=\"Fabric\") diff --git a/ReactCommon/react/nativemodule/core/CMakeLists.txt b/ReactCommon/react/nativemodule/core/CMakeLists.txt index 841ee87087ce0d..909cd427f359da 100644 --- a/ReactCommon/react/nativemodule/core/CMakeLists.txt +++ b/ReactCommon/react/nativemodule/core/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"ReactNative\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"ReactNative\") file(GLOB react_nativemodule_core_SRC CONFIGURE_DEPENDS diff --git a/ReactCommon/react/nativemodule/samples/platform/android/CMakeLists.txt b/ReactCommon/react/nativemodule/samples/platform/android/CMakeLists.txt index 84d080c08398a6..fd5f627983bdda 100644 --- a/ReactCommon/react/nativemodule/samples/platform/android/CMakeLists.txt +++ b/ReactCommon/react/nativemodule/samples/platform/android/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"ReactNative\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"ReactNative\") file(GLOB sampleturbomodule_SRC CONFIGURE_DEPENDS ReactCommon/*.cpp) add_library(sampleturbomodule STATIC ${sampleturbomodule_SRC}) diff --git a/ReactCommon/react/renderer/animations/CMakeLists.txt b/ReactCommon/react/renderer/animations/CMakeLists.txt index 75e3bc4c3632f3..89fe0368286bd8 100644 --- a/ReactCommon/react/renderer/animations/CMakeLists.txt +++ b/ReactCommon/react/renderer/animations/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB react_render_animations_SRC CONFIGURE_DEPENDS *.cpp) add_library(react_render_animations SHARED ${react_render_animations_SRC}) diff --git a/ReactCommon/react/renderer/attributedstring/CMakeLists.txt b/ReactCommon/react/renderer/attributedstring/CMakeLists.txt index 03bc7df962d37c..b5399e44e48daa 100644 --- a/ReactCommon/react/renderer/attributedstring/CMakeLists.txt +++ b/ReactCommon/react/renderer/attributedstring/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB react_render_attributedstring_SRC CONFIGURE_DEPENDS *.cpp) add_library(react_render_attributedstring SHARED ${react_render_attributedstring_SRC}) diff --git a/ReactCommon/react/renderer/componentregistry/CMakeLists.txt b/ReactCommon/react/renderer/componentregistry/CMakeLists.txt index 23b256112aa1a8..fa02501aaf8338 100644 --- a/ReactCommon/react/renderer/componentregistry/CMakeLists.txt +++ b/ReactCommon/react/renderer/componentregistry/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB react_render_componentregistry_SRC CONFIGURE_DEPENDS *.cpp) add_library(react_render_componentregistry SHARED ${react_render_componentregistry_SRC}) diff --git a/ReactCommon/react/renderer/componentregistry/native/CMakeLists.txt b/ReactCommon/react/renderer/componentregistry/native/CMakeLists.txt index 270c2e4334502a..fabef78d62f02d 100644 --- a/ReactCommon/react/renderer/componentregistry/native/CMakeLists.txt +++ b/ReactCommon/react/renderer/componentregistry/native/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB rrc_native_SRC CONFIGURE_DEPENDS *.cpp) add_library(rrc_native SHARED ${rrc_native_SRC}) diff --git a/ReactCommon/react/renderer/components/image/CMakeLists.txt b/ReactCommon/react/renderer/components/image/CMakeLists.txt index c78c9a26b80440..9e5e0989e3298f 100644 --- a/ReactCommon/react/renderer/components/image/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/image/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB rrc_image_SRC CONFIGURE_DEPENDS *.cpp) add_library(rrc_image SHARED ${rrc_image_SRC}) diff --git a/ReactCommon/react/renderer/components/modal/CMakeLists.txt b/ReactCommon/react/renderer/components/modal/CMakeLists.txt index 8f596972539756..ed70bda43a57c0 100644 --- a/ReactCommon/react/renderer/components/modal/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/modal/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB rrc_modal_SRC CONFIGURE_DEPENDS *.cpp) add_library(rrc_modal STATIC ${rrc_modal_SRC}) diff --git a/ReactCommon/react/renderer/components/progressbar/CMakeLists.txt b/ReactCommon/react/renderer/components/progressbar/CMakeLists.txt index fcde0f752111ae..f7091a4b8ae618 100644 --- a/ReactCommon/react/renderer/components/progressbar/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/progressbar/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB rrc_progressbar_SRC CONFIGURE_DEPENDS android/react/renderer/components/progressbar/*.cpp) add_library(rrc_progressbar STATIC ${rrc_progressbar_SRC}) diff --git a/ReactCommon/react/renderer/components/root/CMakeLists.txt b/ReactCommon/react/renderer/components/root/CMakeLists.txt index 96b43b7498a485..8592834feb1e27 100644 --- a/ReactCommon/react/renderer/components/root/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/root/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB rrc_root_SRC CONFIGURE_DEPENDS *.cpp) add_library(rrc_root SHARED ${rrc_root_SRC}) diff --git a/ReactCommon/react/renderer/components/scrollview/CMakeLists.txt b/ReactCommon/react/renderer/components/scrollview/CMakeLists.txt index 92927ff967889c..d664e5e2faf16f 100644 --- a/ReactCommon/react/renderer/components/scrollview/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/scrollview/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB rrc_scrollview_SRC CONFIGURE_DEPENDS *.cpp) add_library(rrc_scrollview SHARED ${rrc_scrollview_SRC}) diff --git a/ReactCommon/react/renderer/components/slider/CMakeLists.txt b/ReactCommon/react/renderer/components/slider/CMakeLists.txt index e4d39414e37b3e..e69b5146b92ea9 100644 --- a/ReactCommon/react/renderer/components/slider/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/slider/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB rrc_slider_SRC CONFIGURE_DEPENDS *.cpp platform/android/react/renderer/components/slider/*.cpp) add_library(rrc_slider STATIC ${rrc_slider_SRC}) diff --git a/ReactCommon/react/renderer/components/switch/CMakeLists.txt b/ReactCommon/react/renderer/components/switch/CMakeLists.txt index 97a513978c7c77..b09fc00064447f 100644 --- a/ReactCommon/react/renderer/components/switch/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/switch/CMakeLists.txt @@ -41,4 +41,6 @@ target_compile_options( -frtti -std=c++17 -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments ) diff --git a/ReactCommon/react/renderer/components/text/CMakeLists.txt b/ReactCommon/react/renderer/components/text/CMakeLists.txt index 392d76171b476e..1866337440ff89 100644 --- a/ReactCommon/react/renderer/components/text/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/text/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB rrc_text_SRC CONFIGURE_DEPENDS *.cpp) add_library(rrc_text SHARED ${rrc_text_SRC}) diff --git a/ReactCommon/react/renderer/components/textinput/CMakeLists.txt b/ReactCommon/react/renderer/components/textinput/CMakeLists.txt index 84826c23d3f5ed..80eb0f5400e10e 100644 --- a/ReactCommon/react/renderer/components/textinput/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/textinput/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB rrc_textinput_SRC CONFIGURE_DEPENDS androidtextinput/react/renderer/components/androidtextinput/*.cpp) add_library(rrc_textinput SHARED ${rrc_textinput_SRC}) diff --git a/ReactCommon/react/renderer/components/unimplementedview/CMakeLists.txt b/ReactCommon/react/renderer/components/unimplementedview/CMakeLists.txt index 7b128501bd812d..5620fb7f757f67 100644 --- a/ReactCommon/react/renderer/components/unimplementedview/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/unimplementedview/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB rrc_unimplementedview_SRC CONFIGURE_DEPENDS *.cpp) add_library(rrc_unimplementedview SHARED ${rrc_unimplementedview_SRC}) diff --git a/ReactCommon/react/renderer/components/view/CMakeLists.txt b/ReactCommon/react/renderer/components/view/CMakeLists.txt index 6320bd0bdfb033..fb32b0b1873ac0 100644 --- a/ReactCommon/react/renderer/components/view/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/view/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB rrc_view_SRC CONFIGURE_DEPENDS *.cpp) add_library(rrc_view SHARED ${rrc_view_SRC}) diff --git a/ReactCommon/react/renderer/core/CMakeLists.txt b/ReactCommon/react/renderer/core/CMakeLists.txt index 890e6e68c8d5f7..09627498c93668 100644 --- a/ReactCommon/react/renderer/core/CMakeLists.txt +++ b/ReactCommon/react/renderer/core/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB react_render_core_SRC CONFIGURE_DEPENDS *.cpp) add_library(react_render_core SHARED ${react_render_core_SRC}) diff --git a/ReactCommon/react/renderer/debug/CMakeLists.txt b/ReactCommon/react/renderer/debug/CMakeLists.txt index 44c5fd4c92dece..23dfd98e46ecfb 100644 --- a/ReactCommon/react/renderer/debug/CMakeLists.txt +++ b/ReactCommon/react/renderer/debug/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB react_render_debug_SRC CONFIGURE_DEPENDS *.cpp) add_library(react_render_debug SHARED ${react_render_debug_SRC}) diff --git a/ReactCommon/react/renderer/graphics/CMakeLists.txt b/ReactCommon/react/renderer/graphics/CMakeLists.txt index a52ce0bfe1fdbd..a977c4080733e0 100644 --- a/ReactCommon/react/renderer/graphics/CMakeLists.txt +++ b/ReactCommon/react/renderer/graphics/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB react_render_graphics_SRC CONFIGURE_DEPENDS *.cpp diff --git a/ReactCommon/react/renderer/imagemanager/CMakeLists.txt b/ReactCommon/react/renderer/imagemanager/CMakeLists.txt index c27b11febcc364..e4fd71c8c93f8e 100644 --- a/ReactCommon/react/renderer/imagemanager/CMakeLists.txt +++ b/ReactCommon/react/renderer/imagemanager/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB react_render_imagemanager_SRC CONFIGURE_DEPENDS *.cpp diff --git a/ReactCommon/react/renderer/leakchecker/CMakeLists.txt b/ReactCommon/react/renderer/leakchecker/CMakeLists.txt index d7657198d942df..e8508fd5593ed2 100644 --- a/ReactCommon/react/renderer/leakchecker/CMakeLists.txt +++ b/ReactCommon/react/renderer/leakchecker/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB react_render_leakchecker_SRC CONFIGURE_DEPENDS *.cpp) add_library(react_render_leakchecker SHARED ${react_render_leakchecker_SRC}) diff --git a/ReactCommon/react/renderer/mapbuffer/CMakeLists.txt b/ReactCommon/react/renderer/mapbuffer/CMakeLists.txt index fe3648152f51bd..1d2ce40117a030 100644 --- a/ReactCommon/react/renderer/mapbuffer/CMakeLists.txt +++ b/ReactCommon/react/renderer/mapbuffer/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB react_render_mapbuffer_SRC CONFIGURE_DEPENDS *.cpp) add_library(react_render_mapbuffer SHARED ${react_render_mapbuffer_SRC}) diff --git a/ReactCommon/react/renderer/mounting/CMakeLists.txt b/ReactCommon/react/renderer/mounting/CMakeLists.txt index 58b3124362400f..e369ae904fe39a 100644 --- a/ReactCommon/react/renderer/mounting/CMakeLists.txt +++ b/ReactCommon/react/renderer/mounting/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB react_render_mounting_SRC CONFIGURE_DEPENDS *.cpp) add_library(react_render_mounting SHARED ${react_render_mounting_SRC}) diff --git a/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt b/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt index 5a18fb85c09ad8..c11429d3812f9c 100644 --- a/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt +++ b/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB react_render_runtimescheduler_SRC CONFIGURE_DEPENDS *.cpp) add_library(react_render_runtimescheduler SHARED ${react_render_runtimescheduler_SRC}) diff --git a/ReactCommon/react/renderer/scheduler/CMakeLists.txt b/ReactCommon/react/renderer/scheduler/CMakeLists.txt index 3823b9d3c1e102..62e979c97194a8 100644 --- a/ReactCommon/react/renderer/scheduler/CMakeLists.txt +++ b/ReactCommon/react/renderer/scheduler/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB react_render_scheduler_SRC CONFIGURE_DEPENDS *.cpp) add_library(react_render_scheduler SHARED ${react_render_scheduler_SRC}) diff --git a/ReactCommon/react/renderer/telemetry/CMakeLists.txt b/ReactCommon/react/renderer/telemetry/CMakeLists.txt index cad8f9e81cd3c2..aae37e0c19d221 100644 --- a/ReactCommon/react/renderer/telemetry/CMakeLists.txt +++ b/ReactCommon/react/renderer/telemetry/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB react_render_telemetry_SRC CONFIGURE_DEPENDS *.cpp) add_library(react_render_telemetry SHARED ${react_render_telemetry_SRC}) diff --git a/ReactCommon/react/renderer/templateprocessor/CMakeLists.txt b/ReactCommon/react/renderer/templateprocessor/CMakeLists.txt index 2aeaa6d101f478..c8bac1961879e0 100644 --- a/ReactCommon/react/renderer/templateprocessor/CMakeLists.txt +++ b/ReactCommon/react/renderer/templateprocessor/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB react_render_templateprocessor_SRC CONFIGURE_DEPENDS *.cpp) add_library(react_render_templateprocessor SHARED ${react_render_templateprocessor_SRC}) diff --git a/ReactCommon/react/renderer/textlayoutmanager/CMakeLists.txt b/ReactCommon/react/renderer/textlayoutmanager/CMakeLists.txt index ad4936a5029ef1..8027f57c47d53f 100644 --- a/ReactCommon/react/renderer/textlayoutmanager/CMakeLists.txt +++ b/ReactCommon/react/renderer/textlayoutmanager/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB react_render_textlayourmanager_SRC CONFIGURE_DEPENDS *.cpp diff --git a/ReactCommon/react/renderer/uimanager/CMakeLists.txt b/ReactCommon/react/renderer/uimanager/CMakeLists.txt index 0d9f7403b05b8c..5545fb0405e666 100644 --- a/ReactCommon/react/renderer/uimanager/CMakeLists.txt +++ b/ReactCommon/react/renderer/uimanager/CMakeLists.txt @@ -6,7 +6,14 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments + -DLOG_TAG=\"Fabric\") file(GLOB react_render_uimanager_SRC CONFIGURE_DEPENDS *.cpp) add_library(react_render_uimanager SHARED ${react_render_uimanager_SRC}) diff --git a/ReactCommon/react/utils/CMakeLists.txt b/ReactCommon/react/utils/CMakeLists.txt index 335ebf9c365e76..8c63c41500c5a0 100644 --- a/ReactCommon/react/utils/CMakeLists.txt +++ b/ReactCommon/react/utils/CMakeLists.txt @@ -11,6 +11,8 @@ add_compile_options( -frtti -std=c++17 -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments -DLOG_TAG=\"Fabric\") file(GLOB react_utils_SRC CONFIGURE_DEPENDS *.cpp *.mm) diff --git a/ReactCommon/reactperflogger/CMakeLists.txt b/ReactCommon/reactperflogger/CMakeLists.txt index 5c18745cc57cc1..41fe1face06b31 100644 --- a/ReactCommon/reactperflogger/CMakeLists.txt +++ b/ReactCommon/reactperflogger/CMakeLists.txt @@ -6,7 +6,13 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall) +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments) file(GLOB reactperflogger_SRC CONFIGURE_DEPENDS reactperflogger/*.cpp) add_library(reactperflogger STATIC ${reactperflogger_SRC}) diff --git a/ReactCommon/runtimeexecutor/CMakeLists.txt b/ReactCommon/runtimeexecutor/CMakeLists.txt index b07e6b636253fd..f33e7068ccb47b 100644 --- a/ReactCommon/runtimeexecutor/CMakeLists.txt +++ b/ReactCommon/runtimeexecutor/CMakeLists.txt @@ -6,7 +6,13 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -std=c++17 -Wall) +add_compile_options( + -fexceptions + -frtti + -std=c++17 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments) file(GLOB_RECURSE runtimeexecutor_SRC CONFIGURE_DEPENDS *.cpp *.h) diff --git a/ReactCommon/yoga/CMakeLists.txt b/ReactCommon/yoga/CMakeLists.txt index c7e6cd4fd23cb0..ff370aa76ebd05 100644 --- a/ReactCommon/yoga/CMakeLists.txt +++ b/ReactCommon/yoga/CMakeLists.txt @@ -6,7 +6,13 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -add_compile_options(-fexceptions -frtti -O3 -Wall) +add_compile_options( + -fexceptions + -frtti + -O3 + -Wall + -Wpedantic + -Wno-gnu-zero-variadic-macro-arguments) file(GLOB_RECURSE yogacore_SRC CONFIGURE_DEPENDS yoga/*.cpp) add_library(yogacore STATIC ${yogacore_SRC})