浏览代码

Merge pull request #4475 from chenchuanyin/patch-1

Fix problem: cmake build failed in c++11  by clang
Feng Xiao 7 年之前
父节点
当前提交
a72da27f5a
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      cmake/CMakeLists.txt

+ 3 - 0
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)