소스 검색

Fix problem: cmake build failed in c++11 by clang

CMakeLists.txt adds c++11 flags for clang
Silver Chan 7 년 전
부모
커밋
d3e8a54020
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)