mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Check if cmake is installed on RNTester (#39208)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39208 To properly build RNTester for iOS, we need cmake installed. This small change check whether Cmake is present in the system. If not, it tries to install it using `brew` if that's available. Otherwise, it exits with an error message asking to install cmake. ## Changelog: [Internal] - Check whether Cmake is present for RNTester Reviewed By: dmytrorykun Differential Revision: D48821932 fbshipit-source-id: 94f1000a22a9f9d06efdec70b37698b99af358e5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
40dca3f0db
commit
2423342004
@@ -3,6 +3,22 @@ require_relative '../react-native/scripts/react_native_pods'
|
||||
source 'https://cdn.cocoapods.org/'
|
||||
platform :ios, min_ios_version_supported
|
||||
|
||||
cmake_path = `command -v cmake`
|
||||
|
||||
if cmake_path == ""
|
||||
brew_path = `command -v brew`
|
||||
if brew_path != ""
|
||||
Pod::UI.puts "Installing CMake using brew. This is required to build RNTester.".red
|
||||
`brew install cmake`
|
||||
else
|
||||
Pod::UI.puts "In order to build RNTester locally, you need cmake installed, please install it and try again".red
|
||||
return
|
||||
end
|
||||
else
|
||||
Pod::UI.puts "Cmake found at: #{cmake_path}".green
|
||||
end
|
||||
|
||||
|
||||
prepare_react_native_project!
|
||||
|
||||
IN_CI = ENV['CI'] == 'true'
|
||||
|
||||
Reference in New Issue
Block a user