CMakeLists.txt: Enforce C++11 for old compilers

This commit is contained in:
Ilya Lipnitskiy 2020-05-09 14:27:03 -07:00
parent ce75229b6a
commit 3d3b5fe220

View File

@ -66,6 +66,10 @@ if (MSVC AND MSVC_STATIC_BUILD)
endif(${flag_var} MATCHES "/MD")
endforeach(flag_var)
endif (MSVC AND MSVC_STATIC_BUILD)
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_EXTENSIONS OFF)
FILE(GLOB PROTOC_GEN_C_SRC ${MAIN_DIR}/protoc-c/*.h ${MAIN_DIR}/protoc-c/*.cc )
ADD_EXECUTABLE(protoc-gen-c ${PROTOC_GEN_C_SRC})