Skip to content

Commit 06b55a3

Browse files
NickGerlemanfacebook-github-bot
authored andcommitted
Enable -Wpedantic in OSS Android Targets (#34403)
Summary: Pull Request resolved: #34403 This change mirrors D38457812 (063c2b4) 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
1 parent b8425c8 commit 06b55a3

File tree

39 files changed

+279
-35
lines changed

39 files changed

+279
-35
lines changed

ReactCommon/butter/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ add_compile_options(
1111
-fexceptions
1212
-frtti
1313
-std=c++17
14-
-Wall)
14+
-Wall
15+
-Wpedantic
16+
-Wno-gnu-zero-variadic-macro-arguments)
1517

1618
add_library(butter INTERFACE)
1719

ReactCommon/callinvoker/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
cmake_minimum_required(VERSION 3.13)
77
set(CMAKE_VERBOSE_MAKEFILE on)
88

9-
add_compile_options(-fexceptions -frtti -std=c++17 -Wall)
9+
add_compile_options(
10+
-fexceptions
11+
-frtti
12+
-std=c++17
13+
-Wall
14+
-Wpedantic
15+
-Wno-gnu-zero-variadic-macro-arguments)
1016

1117
add_library(callinvoker INTERFACE)
1218

ReactCommon/react/bridging/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@
66
cmake_minimum_required(VERSION 3.13)
77
set(CMAKE_VERBOSE_MAKEFILE on)
88

9-
add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"ReactNative\")
9+
add_compile_options(
10+
-fexceptions
11+
-frtti
12+
-std=c++17
13+
-Wall
14+
-Wpedantic
15+
-Wno-gnu-zero-variadic-macro-arguments
16+
-DLOG_TAG=\"ReactNative\")
1017

1118
file(GLOB react_bridging_SRC CONFIGURE_DEPENDS *.cpp)
1219

ReactCommon/react/config/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ add_compile_options(
1111
-frtti
1212
-std=c++17
1313
-Wall
14+
-Wpedantic
15+
-Wno-gnu-zero-variadic-macro-arguments
1416
-DLOG_TAG=\"Fabric\")
1517

1618
file(GLOB react_config_SRC CONFIGURE_DEPENDS *.cpp)

ReactCommon/react/debug/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ add_compile_options(
1111
-frtti
1212
-std=c++17
1313
-Wall
14+
-Wpedantic
15+
-Wno-gnu-zero-variadic-macro-arguments
1416
-DLOG_TAG=\"Fabric\")
1517

1618

ReactCommon/react/nativemodule/core/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@
66
cmake_minimum_required(VERSION 3.13)
77
set(CMAKE_VERBOSE_MAKEFILE on)
88

9-
add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"ReactNative\")
9+
add_compile_options(
10+
-fexceptions
11+
-frtti
12+
-std=c++17
13+
-Wall
14+
-Wpedantic
15+
-Wno-gnu-zero-variadic-macro-arguments
16+
-DLOG_TAG=\"ReactNative\")
1017

1118

1219
file(GLOB react_nativemodule_core_SRC CONFIGURE_DEPENDS

ReactCommon/react/nativemodule/samples/platform/android/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@
66
cmake_minimum_required(VERSION 3.13)
77
set(CMAKE_VERBOSE_MAKEFILE on)
88

9-
add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"ReactNative\")
9+
add_compile_options(
10+
-fexceptions
11+
-frtti
12+
-std=c++17
13+
-Wall
14+
-Wpedantic
15+
-Wno-gnu-zero-variadic-macro-arguments
16+
-DLOG_TAG=\"ReactNative\")
1017

1118
file(GLOB sampleturbomodule_SRC CONFIGURE_DEPENDS ReactCommon/*.cpp)
1219
add_library(sampleturbomodule STATIC ${sampleturbomodule_SRC})

ReactCommon/react/renderer/animations/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@
66
cmake_minimum_required(VERSION 3.13)
77
set(CMAKE_VERBOSE_MAKEFILE on)
88

9-
add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\")
9+
add_compile_options(
10+
-fexceptions
11+
-frtti
12+
-std=c++17
13+
-Wall
14+
-Wpedantic
15+
-Wno-gnu-zero-variadic-macro-arguments
16+
-DLOG_TAG=\"Fabric\")
1017

1118
file(GLOB react_render_animations_SRC CONFIGURE_DEPENDS *.cpp)
1219
add_library(react_render_animations SHARED ${react_render_animations_SRC})

ReactCommon/react/renderer/attributedstring/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@
66
cmake_minimum_required(VERSION 3.13)
77
set(CMAKE_VERBOSE_MAKEFILE on)
88

9-
add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\")
9+
add_compile_options(
10+
-fexceptions
11+
-frtti
12+
-std=c++17
13+
-Wall
14+
-Wpedantic
15+
-Wno-gnu-zero-variadic-macro-arguments
16+
-DLOG_TAG=\"Fabric\")
1017

1118
file(GLOB react_render_attributedstring_SRC CONFIGURE_DEPENDS *.cpp)
1219
add_library(react_render_attributedstring SHARED ${react_render_attributedstring_SRC})

ReactCommon/react/renderer/componentregistry/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@
66
cmake_minimum_required(VERSION 3.13)
77
set(CMAKE_VERBOSE_MAKEFILE on)
88

9-
add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\")
9+
add_compile_options(
10+
-fexceptions
11+
-frtti
12+
-std=c++17
13+
-Wall
14+
-Wpedantic
15+
-Wno-gnu-zero-variadic-macro-arguments
16+
-DLOG_TAG=\"Fabric\")
1017

1118
file(GLOB react_render_componentregistry_SRC CONFIGURE_DEPENDS *.cpp)
1219
add_library(react_render_componentregistry SHARED ${react_render_componentregistry_SRC})

0 commit comments

Comments
 (0)