Set C++ version consistently to C++ 14 (#1203)

Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1203

~~This sets the C++ standard to C++ 17 in the working builds and Apple. GTest will stop supporting C++ 11 soon, so we need to update. C++ 14 is more embeddable, but C++ 17 support and usage should be relatively common now and the language version adds quite a bit.~~

This bumps from C++ 11 to C++ 14 in existing places where it is specified. C++ 17 allows more, and is better aligned to infra (semantics can change in std versions in suprising ways), but C++ 14 still has broader ecosystem compatibility.

Changelog: [Internal]

Reviewed By: cortinico, dmytrorykun

Differential Revision: D42285391

fbshipit-source-id: 88d7b6b8783a80b9b2e48781a2fd3d326ecd87d0
This commit is contained in:
Nick Gerleman
2023-01-10 09:44:00 -08:00
committed by Facebook GitHub Bot
parent 83cef5b12f
commit 53a8842abb
4 changed files with 5 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ add_compile_options(
-ffunction-sections
-fdata-sections
-Wall
-std=c++11)
-std=c++14)
file(GLOB_RECURSE yogacore_SRC yoga/*.cpp)
add_library(yogacore STATIC ${yogacore_SRC})
@@ -28,7 +28,7 @@ if (ANDROID)
target_link_libraries(yogacore android log)
endif()
set_target_properties(yogacore PROPERTIES CXX_STANDARD 11)
set_target_properties(yogacore PROPERTIES CXX_STANDARD 14)
# cmake install config
include(GNUInstallDirs)

View File

@@ -30,7 +30,7 @@ Pod::Spec.new do |spec|
'-fexceptions',
'-Wall',
'-Werror',
'-std=c++1y',
'-std=c++14',
'-fPIC'
]
spec.source_files = 'yoga/**/*.{c,h,cpp}'

View File

@@ -24,7 +24,7 @@ add_compile_options(
-ffunction-sections
-fdata-sections
-Wall
-std=c++11)
-std=c++14)
file(GLOB jni_SRC
jni/*.cpp)

View File

@@ -14,7 +14,7 @@ file(GLOB SOURCES
include_directories(..)
set(CXX_STANDARD, 11)
set(CXX_STANDARD, 14)
add_compile_definitions(
EMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0)