aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorGravatar Corentin Le Molgat <corentinl@google.com>2018-04-24 17:13:15 +0200
committerGravatar Corentin Le Molgat <corentinl@google.com>2018-04-24 17:21:16 +0200
commitc3b152c7e051c2984da0e893693f1204de90dc94 (patch)
tree2083148f6fc9331331a660f1c7f84e7a1f507314 /cmake
parent8417871a715bad6cbc97eaf0c64957ffe204aeb5 (diff)
CMake: Update CXX Standard management
Diffstat (limited to 'cmake')
-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)