diff options
Diffstat (limited to 'examples/cpp/helloworld/CMakeLists.txt')
-rw-r--r-- | examples/cpp/helloworld/CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/cpp/helloworld/CMakeLists.txt b/examples/cpp/helloworld/CMakeLists.txt index 8f098c91a6..71a8db4f24 100644 --- a/examples/cpp/helloworld/CMakeLists.txt +++ b/examples/cpp/helloworld/CMakeLists.txt @@ -2,7 +2,11 @@ cmake_minimum_required(VERSION 2.8)
# Project
-project(HelloWorld CXX)
+project(HelloWorld C CXX)
+
+if(NOT MSVC)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+endif()
# Protobuf
set(protobuf_MODULE_COMPATIBLE TRUE)
|