Skip to content

Commit d5d5874

Browse files
cortinicopull[bot]
authored andcommitted
Add -Wno-error=cpp on App's default Cmake file (#37516)
Summary: Pull Request resolved: #37516 This will fail build failures from apps which are using libraries which imports ``` #include <react/renderer/graphics/conversions.h> ``` That's just a warning but our usage of `-Wall -Werror` is causing this to fail user builds. More context on this issue here: reactwg/react-native-releases#54 (comment) We can revert this `-Wno-error` once we're on 0.73 as that specific #warning will be entirely removed from the codebase. Changelog: [Internal] [Changed] - Add -Wno-error=cpp on App's default Cmake file Reviewed By: dmytrorykun Differential Revision: D46071400 fbshipit-source-id: 4937fb1255df3f2765f645dfd59f5c58526dee42
1 parent 1c922b3 commit d5d5874

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

packages/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,20 @@ target_include_directories(${CMAKE_PROJECT_NAME}
4646
${CMAKE_CURRENT_SOURCE_DIR}
4747
${PROJECT_BUILD_DIR}/generated/rncli/src/main/jni)
4848

49-
target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -Wall -Werror -fexceptions -frtti -std=c++17 -DWITH_INSPECTOR=1 -DLOG_TAG=\"ReactNative\")
49+
target_compile_options(${CMAKE_PROJECT_NAME}
50+
PRIVATE
51+
-Wall
52+
-Werror
53+
# We suppress cpp #error and #warning to don't fail the build
54+
# due to use migrating away from
55+
# #include <react/renderer/graphics/conversions.h>
56+
# This can be removed for React Native 0.73
57+
-Wno-error=cpp
58+
-fexceptions
59+
-frtti
60+
-std=c++17
61+
-DWITH_INSPECTOR=1
62+
-DLOG_TAG=\"ReactNative\")
5063

5164
# Prefab packages from React Native
5265
find_package(ReactAndroid REQUIRED CONFIG)

0 commit comments

Comments
 (0)