Summary: On MacOS, the following steps result in build errors: ``` mkdir build cd build cmake .. make ``` The problem is that yogacore uses C++11 features (`constexpr`) but C++11 isn't specified in CMakeLists.txt. This PR solves the poblem by adding the following code to the bottom of CMakeLists.txt: ``` set_target_properties(yogacore PROPERTIES CXX_STANDARD 11) ``` This solution was derived from https://stackoverflow.com/questions/45688522/how-to-enable-c17-in-cmake Pull Request resolved: https://github.com/facebook/yoga/pull/887 Differential Revision: D15334282 Pulled By: davidaurelio fbshipit-source-id: a599d8a8f555f7f9cd8dc333e12dc2387d5b2d7a
17 lines
437 B
CMake
17 lines
437 B
CMake
#
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
#
|
|
|
|
cmake_minimum_required(VERSION 3.4.1)
|
|
|
|
set(CMAKE_VERBOSE_MAKEFILE on)
|
|
|
|
file(GLOB yogacore_SRC yoga/*.cpp)
|
|
add_library(yogacore STATIC ${yogacore_SRC})
|
|
|
|
target_link_libraries(yogacore android log)
|
|
set_target_properties(yogacore PROPERTIES CXX_STANDARD 11)
|