From 4caadb9205bcb9f745cda2e3c310b27837cfd636 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 25 Aug 2017 12:59:11 +0200 Subject: fix helloworld cmake build --- examples/cpp/helloworld/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'examples/cpp') 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) -- cgit v1.2.3