From 4db1b3e8cd39dca5b3a6106366d45fbac0232f38 Mon Sep 17 00:00:00 2001 From: Riley Dulin Date: Wed, 3 Feb 2021 10:40:03 -0800 Subject: [PATCH] Change JSI compiler options to be private Summary: JSI had its compiler options like `-Wno-non-virtual-dtor` exported to targets that depended on the JSI library. These flags should be private to the compiler invocation on the `jsi.cpp` translation unit and don't need to be shared with any libraries pulling in `jsi.h`. Fixes #448 Changelog: [Internal] - Don't export C++ warnings from JSI CMake files Reviewed By: Huxpro Differential Revision: D26212636 fbshipit-source-id: bd95580f89694189975a49660c439e4e5f7c5afc --- ReactCommon/jsi/jsi/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactCommon/jsi/jsi/CMakeLists.txt b/ReactCommon/jsi/jsi/CMakeLists.txt index 121d697fd8e..acfa48395e5 100644 --- a/ReactCommon/jsi/jsi/CMakeLists.txt +++ b/ReactCommon/jsi/jsi/CMakeLists.txt @@ -24,7 +24,7 @@ endif() if (HERMES_ENABLE_BITCODE) list(APPEND jsi_compile_flags "-fembed-bitcode") endif () -target_compile_options(jsi PUBLIC ${jsi_compile_flags}) +target_compile_options(jsi PRIVATE ${jsi_compile_flags}) install(DIRECTORY "${PROJECT_SOURCE_DIR}/API/jsi/" DESTINATION include FILES_MATCHING PATTERN "*.h"