[PATCH] Set -std=c++11 flag for g++
Anton Lundin
glance at acc.umu.se
Wed Jun 22 13:47:23 PDT 2016
With Qt 5.7, they started to require c++11 support, and in 5.6.1 some
nullptr's showed up in QtAndroidExtras/qandroidfunctions.h, so now we
need to compile our c++ code with c++11 support in our compiler.
Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cc7db13..8147468 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,6 +73,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
# using Intel C++
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
--
2.7.4
More information about the subsurface
mailing list