[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 48c0613 20/30: Fix Boost detection and use in
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 48c0613 20/30: Fix Boost detection and use in configure with clang in C++17 mode |
Date: |
Wed, 24 Mar 2021 15:31:10 -0400 (EDT) |
branch: master
commit 48c06136561d8607cf9a2f57df38f2c7674321c8
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Fix Boost detection and use in configure with clang in C++17 mode
The use of "register" in one of the headers triggers a -Wregister which
is actually a fatal error, so get rid of it by simply removing
"register" using preprocessor.
Also define BOOST_NO_AUTO_PTR to prevent the use of std::auto_ptr<>
which is not available in C++17 version of libc++. Unlike the "register"
hack, this is also needed for compiling lmi code using this header.
---
configure.ac | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/configure.ac b/configure.ac
index 566dc14..dc581fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -346,6 +346,11 @@ else
if they are installed in non default location"
fi
+dnl Disable the use of std::auto_ptr<> which is not available in C++17 (and is
+dnl actually not available, rather than still being there and just generating
+dnl deprecation warnings, in clang libc++).
+CPPFLAGS="$CPPFLAGS -DBOOST_NO_AUTO_PTR"
+
AC_CHECK_HEADER([boost/type_traits.hpp],
[],
[AC_MSG_FAILURE([Boost headers not found, $errmsg])],
@@ -362,6 +367,7 @@ boost_libsystem="boost_system$lmi_boost_toolkit"
boost_libfs="boost_filesystem$lmi_boost_toolkit"
boost_libregex="boost_regex$lmi_boost_toolkit"
+save_CPPFLAGS=$CPPFLAGS
save_LIBS=$LIBS
save_LDFLAGS=$LDFLAGS
if test "x$lmi_boost_libs" != "x"; then
@@ -373,6 +379,10 @@ else
if it is installed in non default location"
fi
+dnl Prevent warnings due to the use of "register" in Boost.Regex headers that
+dnl are actually fatal errors with clang in C++17 mode.
+CPPFLAGS="$save_CPPFLAGS -Dregister="
+
dnl latest versions of boost extract some common functionality in
dnl libboost_system which we must link when using any other Boost library, so
dnl check for it first
@@ -398,6 +408,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include
<boost/regex.hpp>]],
LDFLAGS=$save_LDFLAGS
LIBS=$save_LIBS
+CPPFLAGS=$save_CPPFLAGS
BOOST_LIBS="-l$boost_libfs -l$boost_libregex $BOOST_LIBS"
- [lmi-commits] [lmi] master 2b7e012 02/30: Rename tests in automake Makefile to use foo_test convention too, (continued)
- [lmi-commits] [lmi] master 2b7e012 02/30: Rename tests in automake Makefile to use foo_test convention too, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master 06a8f83 01/30: Add libtest_common to automake Makefile, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master dad090e 05/30: Add build directory to PATH when running lmi tests with autotools, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master 80c978c 10/30: Run apt-get only once to install all packages in the CI workflow, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master 35acf2a 03/30: Force linking CLI alert initialization functions into the tests, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master db6123b 06/30: Use -frounding-math option when building with autotools too, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master 2c9d788 12/30: Run apt-get quietly in GitHub Actions CI workflow, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master f8a78ba 15/30: Add a CI build using clang with autotools too, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master c5d4a99 17/30: Show config.log if configure step in the CI build fails, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master d5728f4 19/30: Show the test suite log if running tests failed in the CI build, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master 48c0613 20/30: Fix Boost detection and use in configure with clang in C++17 mode,
Greg Chicares <=
- [lmi-commits] [lmi] master 41bd0a3 22/30: Update wx submodule to avoid clang warning in wx/hashmap.h, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master 1f94454 25/30: Disable clang -Wstring-plus-int warning, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master 12922c2 27/30: Generate product files in the CI builds using autotools too, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master 80e1b14 23/30: Fix caching of wxWidgets and wxPdfDoc libraries, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master f4a91e3 28/30: Move XSD and XSL copy command to a more appropriate CI job step, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master 593a712 29/30: Actually update wx, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master 0b85c14 30/30: Improve documentation, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master b0ed5cc 07/30: Create required files in the build directory with autotools, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master f5b317c 08/30: Don't skip path_utility_test unnecessarily in the CI builds, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master ecd3435 11/30: Default to x86_64-pc-linux-gnu LMI_TRIPLET in the CI builds, Greg Chicares, 2021/03/24