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:
committed by
Facebook GitHub Bot
parent
83cef5b12f
commit
53a8842abb
@@ -14,7 +14,7 @@ add_compile_options(
|
|||||||
-ffunction-sections
|
-ffunction-sections
|
||||||
-fdata-sections
|
-fdata-sections
|
||||||
-Wall
|
-Wall
|
||||||
-std=c++11)
|
-std=c++14)
|
||||||
|
|
||||||
file(GLOB_RECURSE yogacore_SRC yoga/*.cpp)
|
file(GLOB_RECURSE yogacore_SRC yoga/*.cpp)
|
||||||
add_library(yogacore STATIC ${yogacore_SRC})
|
add_library(yogacore STATIC ${yogacore_SRC})
|
||||||
@@ -28,7 +28,7 @@ if (ANDROID)
|
|||||||
target_link_libraries(yogacore android log)
|
target_link_libraries(yogacore android log)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties(yogacore PROPERTIES CXX_STANDARD 11)
|
set_target_properties(yogacore PROPERTIES CXX_STANDARD 14)
|
||||||
|
|
||||||
# cmake install config
|
# cmake install config
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
@@ -30,7 +30,7 @@ Pod::Spec.new do |spec|
|
|||||||
'-fexceptions',
|
'-fexceptions',
|
||||||
'-Wall',
|
'-Wall',
|
||||||
'-Werror',
|
'-Werror',
|
||||||
'-std=c++1y',
|
'-std=c++14',
|
||||||
'-fPIC'
|
'-fPIC'
|
||||||
]
|
]
|
||||||
spec.source_files = 'yoga/**/*.{c,h,cpp}'
|
spec.source_files = 'yoga/**/*.{c,h,cpp}'
|
||||||
|
@@ -24,7 +24,7 @@ add_compile_options(
|
|||||||
-ffunction-sections
|
-ffunction-sections
|
||||||
-fdata-sections
|
-fdata-sections
|
||||||
-Wall
|
-Wall
|
||||||
-std=c++11)
|
-std=c++14)
|
||||||
|
|
||||||
file(GLOB jni_SRC
|
file(GLOB jni_SRC
|
||||||
jni/*.cpp)
|
jni/*.cpp)
|
||||||
|
@@ -14,7 +14,7 @@ file(GLOB SOURCES
|
|||||||
|
|
||||||
include_directories(..)
|
include_directories(..)
|
||||||
|
|
||||||
set(CXX_STANDARD, 11)
|
set(CXX_STANDARD, 14)
|
||||||
|
|
||||||
add_compile_definitions(
|
add_compile_definitions(
|
||||||
EMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0)
|
EMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0)
|
||||||
|
Reference in New Issue
Block a user