Switch to C++17 for GUI.
Adjust compiler flags to use `-std=gnu++17` for gcc/clang instead of `-std=gnu++11` and `/std:c++17` for msvc. Remove Ubuntu trusty job from travis (it's too old.) Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
cb0933bf44
commit
890f560553
|
@ -14,8 +14,6 @@ matrix:
|
|||
# dist: bionic
|
||||
# - env: BUILD_ENV=nostl XVFB_RUN=1
|
||||
# dist: bionic
|
||||
- env: BUILD_ENV=ubuntu-trusty XVFB_RUN=1
|
||||
dist: trusty
|
||||
- env: BUILD_ENV=ubuntu-xenial XVFB_RUN=1
|
||||
- env: BUILD_ENV=ubuntu-xenial-minimal INSTALLDEPS_ARGS="--no-openal --no-ffmpeg" XVFB_RUN=1
|
||||
- env: BUILD_ENV=ubuntu-xenial XVFB_RUN=1 CC=clang CXX=clang++
|
||||
|
|
|
@ -678,7 +678,13 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
|||
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
set(MY_CXX_FLAGS -std=gnu++11 -fexceptions)
|
||||
check_cxx_compiler_flag(-std=gnu++17 GNUPP17_FLAG)
|
||||
|
||||
if(NOT GNUPP17_FLAG)
|
||||
message(FATAL_ERROR "Your compiler does not support -std=gnu++17.")
|
||||
endif()
|
||||
|
||||
set(MY_CXX_FLAGS -std=gnu++17 -fexceptions)
|
||||
|
||||
foreach(ARG ${MY_CXX_FLAGS})
|
||||
set(MY_CXX_FLAGS_STR "${MY_CXX_FLAGS_STR} ${ARG}")
|
||||
|
@ -724,6 +730,8 @@ elseif(MSVC)
|
|||
string(REGEX REPLACE "/[Ww][^ ]+" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
|
||||
string(REGEX REPLACE "/[Ww][^ ]+" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
|
||||
add_compile_options(/std:c++17)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
add_compile_options(/W4)
|
||||
else()
|
||||
|
|
|
@ -42,8 +42,8 @@ esac
|
|||
|
||||
export CPPFLAGS="$CPPFLAGS${CPPFLAGS:+ }-I\$BUILD_ROOT/root/include -DCURL_STATICLIB -DGRAPHITE2_STATIC"
|
||||
export CFLAGS="$CFLAGS${CFLAGS:+ }-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -pthread -lm -DCURL_STATICLIB -DGRAPHITE2_STATIC"
|
||||
export CXXFLAGS="$CXXFLAGS${CXXFLAGS:+ }-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -pthread -lm -DCURL_STATICLIB -DGRAPHITE2_STATIC"
|
||||
export OBJCXXFLAGS="$OBJCXXFLAGS${OBJCXXFLAGS:+ }-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -pthread -lm -DCURL_STATICLIB -DGRAPHITE2_STATIC"
|
||||
export CXXFLAGS="$CXXFLAGS${CXXFLAGS:+ }-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++17 -fpermissive -pthread -lm -DCURL_STATICLIB -DGRAPHITE2_STATIC"
|
||||
export OBJCXXFLAGS="$OBJCXXFLAGS${OBJCXXFLAGS:+ }-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++17 -fpermissive -pthread -lm -DCURL_STATICLIB -DGRAPHITE2_STATIC"
|
||||
export LDFLAGS="$LDFLAGS${LDFLAGS:+ }-fPIC -L\$BUILD_ROOT/root/lib -pthread -lm"
|
||||
export STRIP="\${STRIP:-strip}"
|
||||
|
||||
|
|
|
@ -28,8 +28,8 @@ export BUILD_ENV
|
|||
: ${HOST_CXX:=ccache g++}
|
||||
: ${HOST_CPPFLAGS:="-I\$BUILD_ROOT/root/include"}
|
||||
: ${HOST_CFLAGS:="-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -pthread -lm"}
|
||||
: ${HOST_CXXFLAGS:="-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -pthread -lm"}
|
||||
: ${HOST_OBJCXXFLAGS:="-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -pthread -lm"}
|
||||
: ${HOST_CXXFLAGS:="-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++17 -fpermissive -pthread -lm"}
|
||||
: ${HOST_OBJCXXFLAGS:="-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++17 -fpermissive -pthread -lm"}
|
||||
: ${HOST_LDFLAGS:="-fPIC -L\$BUILD_ROOT/root/lib -pthread -lm"}
|
||||
: ${HOST_LIBS:=-lm}
|
||||
: ${HOST_UUID_LIBS:=}
|
||||
|
|
|
@ -16,8 +16,8 @@ export CC='ccache clang'
|
|||
export CXX='ccache clang++'
|
||||
export CPPFLAGS="-I\$BUILD_ROOT/root/include -DICONV_CONST="
|
||||
export CFLAGS="-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -DICONV_CONST= -Wl,-no_compact_unwind"
|
||||
export CXXFLAGS="-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -stdlib=libc++ -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -DICONV_CONST= -Wl,-no_compact_unwind"
|
||||
export OBJCXXFLAGS="-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++11 -fpermissive -stdlib=libc++ -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -DICONV_CONST= -Wl,-no_compact_unwind"
|
||||
export CXXFLAGS="-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++17 -fpermissive -stdlib=libc++ -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -DICONV_CONST= -Wl,-no_compact_unwind"
|
||||
export OBJCXXFLAGS="-fPIC -I\$BUILD_ROOT/root/include -L\$BUILD_ROOT/root/lib -std=gnu++17 -fpermissive -stdlib=libc++ -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -DICONV_CONST= -Wl,-no_compact_unwind"
|
||||
export LDFLAGS="-fPIC -L\$BUILD_ROOT/root/lib -framework Carbon -framework Foundation -framework CoreServices -Wno-unused-command-line-argument -Wl,-no_compact_unwind"
|
||||
EOF
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue