From d3e8a54020d9875218f79a3ac8f90008cd0e81f8 Mon Sep 17 00:00:00 2001 From: Silver Chan Date: Wed, 4 Apr 2018 10:31:05 +0800 Subject: [PATCH] Fix problem: cmake build failed in c++11 by clang CMakeLists.txt adds c++11 flags for clang --- cmake/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index bf3f886303..fca4da33d1 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -15,6 +15,9 @@ endif() # Project project(protobuf C CXX) +# Add c++11 flags for clang +set(CMAKE_CXX_FLAGS "-std=c++11") + # Options option(protobuf_BUILD_TESTS "Build tests" ON) option(protobuf_BUILD_EXAMPLES "Build examples" OFF)