summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2016-06-23 22:56:26 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-06-23 16:32:10 -0700
commit4f850e2aa556bec262069c8c603e83824811e944 (patch)
treea425354ba59e74cb5843c7b5222cd579b7710d86
parent4d4faecd674bdd2ac3354d25bc74c4570c092d6d (diff)
downloadsubsurface-4f850e2aa556bec262069c8c603e83824811e944.tar.gz
Build Subsurface c++ as c++11 code
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. As Thiago pointed out, this effectively "downgrades" GCC 6 from c++14 support to c++11. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--CMakeLists.txt3
-rw-r--r--packaging/android/build.sh1
2 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cc7db1329..cb05b3af9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,10 +69,13 @@ set(CMAKE_MODULE_PATH
#
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
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 "AppleClang")
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 "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")
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index 3b796b826..bd24f18de 100644
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -335,7 +335,6 @@ fi
PKGCONF=$(which pkg-config)
cmake $MOBILE_CMAKE \
- -DCMAKE_CXX_FLAGS="-std=c++11" \
-DQT_ANDROID_ANT=${ANT} \
-DPKG_CONFIG_EXECUTABLE=${PKGCONF} \
-DQT_ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT \