Skip to content

Commit

Permalink
Upgrade macos CI to use boost 1.75.
Browse files Browse the repository at this point in the history
Because of a bug in brew, the symlink `2to3` must be deleted before
upgrading python.

Boost 1.75 requires at least c++14.  We'll just use c++14 for all
compilation, not just macos.
  • Loading branch information
eyal0 committed Dec 22, 2020
1 parent 67802c4 commit ed4feb0
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 5 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ubuntu, macos]
boost: ['1_60', '1_66', '1_74']
boost: ['1_60', '1_66', '1_75']
geos: ['3.8.1', 'none']
compiler: ['g++', 'g++-8', 'clang++']
exclude:
Expand All @@ -23,7 +23,7 @@ jobs:
- os: macos
boost: '1_66'
- os: ubuntu
boost: '1_74'
boost: '1_75'
- os: macos
compiler: 'g++-8'
include:
Expand Down Expand Up @@ -68,16 +68,17 @@ jobs:
if: matrix.os == 'macos'
run: |
brew update
rm /usr/local/bin/2to3
brew upgrade python@3
brew reinstall -s libtool
brew unlink parallel
brew install boost@1.74 gtkmm moreutils gettext librsvg autoconf automake pkg-config
brew install boost@1.75 gtkmm moreutils gettext librsvg autoconf automake pkg-config
brew upgrade wget
hash -r
ln -f -s `which glibtoolize` $HOME/.local/bin/libtoolize
ln -f -s `which glibtool` $HOME/.local/bin/libtool
hash -r
echo "BOOST_ROOT=/usr/local/opt/boost@1.74" >> $GITHUB_ENV
echo "BOOST_ROOT=/usr/local/opt/boost@1.75" >> $GITHUB_ENV
echo "NUM_CPUS=$((`sysctl -n hw.logicalcpu` * 4))" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opt/libffi/lib/pkgconfig" >> $GITHUB_ENV
echo "CPPFLAGS_gerbv=-DQUARTZ" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ AC_PROG_CC
AC_PROG_LIBTOOL

# Check for C++11
AX_CXX_COMPILE_STDCXX_11
AX_CXX_COMPILE_STDCXX_14

# As reported here https://svn.boost.org/trac/boost/ticket/9240,
# Boost requires -fext-numeric-literals when built with C++11
Expand Down
34 changes: 34 additions & 0 deletions m4/ax_cxx_compile_stdcxx_14.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# =============================================================================
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_14.html
# =============================================================================
#
# SYNOPSIS
#
# AX_CXX_COMPILE_STDCXX_14([ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the C++14
# standard; if necessary, add switches to CXX and CXXCPP to enable
# support.
#
# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
# macro with the version set to C++14. The two optional arguments are
# forwarded literally as the second and third argument respectively.
# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
# more information. If you want to use this macro, you also need to
# download the ax_cxx_compile_stdcxx.m4 file.
#
# LICENSE
#
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 5

AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
AC_DEFUN([AX_CXX_COMPILE_STDCXX_14], [AX_CXX_COMPILE_STDCXX([14], [$1], [$2])])

0 comments on commit ed4feb0

Please sign in to comment.