1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Minetest for C++11 (CMakeLists + Travis)

* Move GCC to GCC 6 & GCC 7
* Move Clang to Clang 3.6 & Clang 4.0
* LINT moves from Clang 3.9 to Clang 4.0
* Move XCode 7.3 to 8.0
* Use more travis tricks to install compilers instead of adding complexity to our build script
* Clang format fixes on checked files (compat Cpp11 instead of Cpp03)
* Mingw GCC update from 4.8.4 to 5.3 (Ubuntu Xenial)
* Drop mingw cmake generated files and add them to gitignore
This commit is contained in:
Loic Blot 2017-05-26 17:03:46 +02:00 committed by Loïc Blot
parent 0e58168fe5
commit bf6569b570
16 changed files with 149 additions and 77 deletions

View file

@ -10,22 +10,15 @@ if [[ "$LINT" == "1" ]]; then
exit 0
fi
if [[ $PLATFORM == "Unix" ]]; then
set_linux_compiler_env
if [[ ${PLATFORM} == "Unix" ]]; then
mkdir -p travisbuild
cd travisbuild || exit 1
CMAKE_FLAGS=''
if [[ $COMPILER == "g++-6" ]]; then
export CC=gcc-6
export CXX=g++-6
fi
# Clang builds with FreeType fail on Travis
if [[ $CC == "clang" ]]; then
CMAKE_FLAGS+=' -DENABLE_FREETYPE=FALSE'
fi
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
if [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
CMAKE_FLAGS+=' -DCUSTOM_GETTEXT_PATH=/usr/local/opt/gettext'
fi
@ -33,12 +26,12 @@ if [[ $PLATFORM == "Unix" ]]; then
-DRUN_IN_PLACE=TRUE \
-DENABLE_GETTEXT=TRUE \
-DBUILD_SERVER=TRUE \
$CMAKE_FLAGS ..
${CMAKE_FLAGS} ..
make -j2
echo "Running unit tests."
CMD="../bin/minetest --run-unittests"
if [[ "$VALGRIND" == "1" ]]; then
if [[ "${VALGRIND}" == "1" ]]; then
valgrind --leak-check=full --leak-check-heuristics=all --undef-value-errors=no --error-exitcode=9 ${CMD} && exit 0
else
${CMD} && exit 0