diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2018-04-27 12:11:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-27 12:11:25 -0700 |
commit | 7f2c3cec63fcbac0b01375211f884979f43eb3ff (patch) | |
tree | 2bb267f81c5c60977204e43d2ebbd21aa3e48eee /cmake/CMakeLists.txt | |
parent | 1b219a174c413af3b18a082a4295ce47932314c4 (diff) | |
parent | c3b152c7e051c2984da0e893693f1204de90dc94 (diff) | |
download | protobuf-7f2c3cec63fcbac0b01375211f884979f43eb3ff.tar.gz protobuf-7f2c3cec63fcbac0b01375211f884979f43eb3ff.tar.bz2 protobuf-7f2c3cec63fcbac0b01375211f884979f43eb3ff.zip |
Merge pull request #4550 from Mizux/master
CMake: Update CXX Standard management
Diffstat (limited to 'cmake/CMakeLists.txt')
-rw-r--r-- | cmake/CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index fca4da33..02429fb1 100644 --- a/cmake/CMakeLists.txt +++ b/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) |