mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
4d4faecd67
commit
4f850e2aa5
2 changed files with 3 additions and 1 deletions
|
@ -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")
|
||||
|
|
|
@ -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 \
|
||||
|
|
Loading…
Reference in a new issue