Skip to content

Commit

Permalink
Add -Wno-error=cpp on App's default Cmake file (#37516)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cortinico authored and facebook-github-bot committed May 22, 2023
1 parent e93bc9b commit c396bc7
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,20 @@ target_include_directories(${CMAKE_PROJECT_NAME}
${CMAKE_CURRENT_SOURCE_DIR}
${PROJECT_BUILD_DIR}/generated/rncli/src/main/jni)

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

# Prefab packages from React Native
find_package(ReactAndroid REQUIRED CONFIG)
Expand Down

0 comments on commit c396bc7

Please sign in to comment.