mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Silence CMake warning caused by PROJECT_ROOT_DIR (#47015)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47015 CMake is complaining that this variable is set outside the build but not used. I'm using it inside our top level .cmake file to silence this warning. We need this variable as user projects might use it. Changelog: [Internal] [Changed] - Silence CMake warning caused by `PROJECT_ROOT_DIR` Reviewed By: javache Differential Revision: D64334462 fbshipit-source-id: 558bfc9f647e62890e3cc25628b5544880c47e4b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3485e9ed87
commit
44c5cc36ad
@@ -35,6 +35,11 @@ if(CMAKE_HOST_WIN32)
|
||||
string(REPLACE "\\" "/" BUILD_DIR ${BUILD_DIR})
|
||||
endif()
|
||||
|
||||
if (PROJECT_ROOT_DIR)
|
||||
# This empty `if` is just to silence a CMake warning and make sure the `PROJECT_ROOT_DIR`
|
||||
# variable is defined if user need to access it.
|
||||
endif ()
|
||||
|
||||
file(GLOB input_SRC CONFIGURE_DEPENDS
|
||||
*.cpp
|
||||
${BUILD_DIR}/generated/autolinking/src/main/jni/*.cpp)
|
||||
|
||||
Reference in New Issue
Block a user