Include <array> head in stl_emulation.h (#7480)

* Add C++ standard builds for windows CI

* Allow C++std to be specified in cmake

* Include <array> in stl_emulation

* Add linux std CI builds
This commit is contained in:
Derek Bailey
2022-08-26 00:22:27 -07:00
committed by GitHub
parent 994502b6dd
commit e2eb5ee670
3 changed files with 51 additions and 1 deletions

View File

@@ -78,6 +78,10 @@ option(FLATBUFFERS_STRICT_MODE
"Build flatbuffers with all warnings as errors (-Werror or /WX)."
OFF)
if(NOT DEFINED FLATBUFFERS_CPP_STD)
set(FLATBUFFERS_CPP_STD 11)
endif()
set(MSVC_LIKE OFF)
if(MSVC OR CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
set(MSVC_LIKE ON)
@@ -334,7 +338,7 @@ include_directories(grpc)
add_library(ProjectConfig INTERFACE)
target_compile_features(ProjectConfig
INTERFACE
cxx_std_11
cxx_std_${FLATBUFFERS_CPP_STD}
)
# Force the standard to be met.