Fix cmake build / update CMakeLists.txt to use C++11 #887
Reference in New Issue
Block a user
No description provided.
Delete Branch "2019-04-12/fix-cmake"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On MacOS, the following steps result in build errors:
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:
This solution was derived from https://stackoverflow.com/questions/45688522/how-to-enable-c17-in-cmake
I notice yoga's javascript binding requires C++14. Would it make sense for me to change this PR to C++14 instead of C++11?
I went with the minimum C++ version that seemed to work. But if C++14 would be more future-proof, we should go with that instead.
C++11 is fine for now, thanks for the fixes!
@davidaurelio is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@davidaurelio merged this pull request in facebook/yoga@afc1108659.
Pull request closed