From bef4bd5bfd3266d4b9c5a2a5e0f42ff638ba6572 Mon Sep 17 00:00:00 2001 From: Jakob Meng Date: Wed, 16 Dec 2020 15:40:44 +0100 Subject: [PATCH] Set symbol visibility to default for Debian 10 (Buster) in GitLab CI Boost.Test 1.67 has issues with hidden symbols. Ref.: https://github.com/boostorg/test/issues/199 --- .gitlab-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c49d0bf..44e35b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,6 +58,20 @@ default: - cd "$CI_PROJECT_DIR" - if [ ! -e build ]; then mkdir build; fi - cd build/ + - > + # Symbol visibility is set to default because Boost.Test 1.67 + # from Debian 10 (Buster) has issues with hidden symbols + # Ref.: https://github.com/boostorg/test/issues/199 + export BOOST_VERSION="$(grep -F '#define BOOST_VERSION ' /usr/include/boost/version.hpp | awk '{ print $3; }')"; + echo "BOOST_VERSION: $BOOST_VERSION"; + if [ "$BOOST_VERSION" = "106700" ]; then + CMAKE_VISIBILITY_OPTIONS=\ + -DCMAKE_CXX_VISIBILITY_PRESET=default \ + -DCMAKE_C_VISIBILITY_PRESET=default \ + -DCMAKE_VISIBILITY_INLINES_HIDDEN=OFF ; + else + CMAKE_VISIBILITY_OPTIONS= ; + fi - > cmake \ "-DCMAKE_BUILD_TYPE=${BUILD_TYPE}" \ @@ -66,6 +80,7 @@ default: -DHBRS_MPL_ENABLE_BENCHMARKS=ON \ -DHBRS_MPL_ENABLE_ELEMENTAL=ON \ -DHBRS_MPL_ENABLE_MATLAB=OFF \ + $CMAKE_VISIBILITY_OPTIONS \ .. || { cat CMakeFiles/CMakeError.log; exit 255; }; - make "-j$(nproc)" - ccache -s