Merge pull request #4550 from Mizux/master

CMake: Update CXX Standard management
pull/4576/head
Feng Xiao 7 years ago committed by GitHub
commit 7f2c3cec63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      cmake/CMakeLists.txt

@ -1,5 +1,5 @@
# Minimum CMake required
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.1.3)
if(protobuf_VERBOSE)
message(STATUS "Protocol Buffers Configuring...")
@ -15,8 +15,10 @@ endif()
# Project
project(protobuf C CXX)
# Add c++11 flags for clang
set(CMAKE_CXX_FLAGS "-std=c++11")
# Add c++11 flags
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Options
option(protobuf_BUILD_TESTS "Build tests" ON)

Loading…
Cancel
Save