← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/fix_osx_nightlies into lp:widelands

 

SirVer has proposed merging lp:~widelands-dev/widelands/fix_osx_nightlies into lp:widelands.

Commit message:
Unbreak nightly builds by un-modernizing some of the recent changes to the OS X toolchain.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1788031 in widelands: "Recent changes broke the Mac OS X nighly builds"
  https://bugs.launchpad.net/widelands/+bug/1788031

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/fix_osx_nightlies/+merge/353456
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/fix_osx_nightlies into lp:widelands.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2018-08-15 01:38:47 +0000
+++ CMakeLists.txt	2018-08-20 21:23:22 +0000
@@ -79,8 +79,9 @@
   endif()
 endif()
 
-# Disable no symbols warning on macOS
-if (APPLE)
+# Disable no symbols warning on macOS, but only on versions where this is
+# supported. It is not supported on OS X 10.7 (DARWIN_MAJOR_VERSION == 11).
+if (APPLE AND ${DARWIN_MAJOR_VERSION} GREATER 11)
     SET(CMAKE_C_ARCHIVE_CREATE   "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
     SET(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
     SET(CMAKE_C_ARCHIVE_FINISH   "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")

=== modified file 'utils/macos/build_app.sh'
--- utils/macos/build_app.sh	2018-08-15 18:33:25 +0000
+++ utils/macos/build_app.sh	2018-08-20 21:23:22 +0000
@@ -2,7 +2,7 @@
 
 set -e
 
-USAGE="Usage: $0 <clang|gcc> <debug|release> <bzr_repo_directory>"
+USAGE="Usage: $0 <clang|gcc|gcc6> <debug|release> <bzr_repo_directory>"
 USE_ASAN="OFF"
 
 if [ ! -z "$3" ]; then
@@ -37,6 +37,12 @@
       CXX_COMPILER="g++-7"
       COMPILER=$(gcc-7 --version | grep "GCC")
       ;;
+   gcc6)
+      # Used for the nightly builds.
+      C_COMPILER="gcc-6"
+      CXX_COMPILER="g++-6"
+      COMPILER=$(gcc-6 --version | grep -i "GCC")
+      ;;
    *)
       echo $USAGE
       exit 1
@@ -173,9 +179,11 @@
    export SDL2TTFDIR="$(brew --prefix sdl2_ttf)"
    export BOOST_ROOT="$(brew --prefix boost)"
    
-   # Not needed for CMake 3.12 or above
-   # see cmake --help-policy CMP0074
-   #export ICU_ROOT="$(brew --prefix icu4c)"
+   # Not needed for CMake 3.12 or above, see cmake --help-policy CMP0074.
+   # However Mac OS X nighlies cannot upgrade to a newer cmake version than
+   # 3.9.4 since nothing newer compiles on Mac OS X 10.7 which is used to build
+   # the nightlies.
+   export ICU_ROOT="$(brew --prefix icu4c)"
 
    cmake $SOURCE_DIR -G Ninja \
       -DCMAKE_C_COMPILER:FILEPATH="$C_COMPILER" \


Follow ups