aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorentin Le Molgat <corentinl@google.com>2018-04-24 17:13:15 +0200
committerCorentin Le Molgat <corentinl@google.com>2018-04-24 17:21:16 +0200
commitc3b152c7e051c2984da0e893693f1204de90dc94 (patch)
tree2083148f6fc9331331a660f1c7f84e7a1f507314
parent8417871a715bad6cbc97eaf0c64957ffe204aeb5 (diff)
downloadprotobuf-c3b152c7e051c2984da0e893693f1204de90dc94.tar.gz
protobuf-c3b152c7e051c2984da0e893693f1204de90dc94.tar.bz2
protobuf-c3b152c7e051c2984da0e893693f1204de90dc94.zip
CMake: Update CXX Standard management
-rw-r--r--cmake/CMakeLists.txt8
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)