Skip to content

Commit 9ca1f4a

Browse files
pwallertsuna
authored andcommitted
Add support for Boost.Chrono.
Signed-off-by: Benoit Sigoure <[email protected]>
1 parent 75ec675 commit 9ca1f4a

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

README

+1
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ runtime or not, etc. The macro will try to find a library that matches your
131131
requirements but may fall back to another flavor of the library if the one you
132132
asked for isn't available.
133133
The following libraries are supported:
134+
- Chrono
134135
- Date_Time
135136
- Filesystem
136137
- Graph

THANKS

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Jens Seidel
1616
Jeremy Powell
1717
Nathan Phillip Brink
1818
Paul Balomiri
19+
Peter Waller
1920
Rhys Ulerich
2021
Staffan Gimåker
2122
Sven Hesse

build-aux/boost.m4

+27
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,33 @@ BOOST_DEFUN([Bind],
480480
[BOOST_FIND_HEADER([boost/bind.hpp])])
481481

482482

483+
# BOOST_CHRONO()
484+
# ------------------
485+
# Look for Boost.Chrono
486+
BOOST_DEFUN([Chrono],
487+
[# Do we have to check for Boost.System? This link-time dependency was
488+
# added as of 1.35.0. If we have a version <1.35, we must not attempt to
489+
# find Boost.System as it didn't exist by then.
490+
if test $boost_major_version -ge 135; then
491+
BOOST_SYSTEM([$1])
492+
fi # end of the Boost.System check.
493+
boost_filesystem_save_LIBS=$LIBS
494+
boost_filesystem_save_LDFLAGS=$LDFLAGS
495+
m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
496+
LIBS="$LIBS $BOOST_SYSTEM_LIBS"
497+
LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
498+
BOOST_FIND_LIB([chrono], [$1],
499+
[boost/chrono.hpp],
500+
[boost::chrono::thread_clock d;])
501+
if test $enable_static_boost = yes && test $boost_major_version -ge 135; then
502+
AC_SUBST([BOOST_FILESYSTEM_LIBS], ["$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"])
503+
fi
504+
LIBS=$boost_filesystem_save_LIBS
505+
LDFLAGS=$boost_filesystem_save_LDFLAGS
506+
507+
])# BOOST_CHRONO
508+
509+
483510
# BOOST_CONVERSION()
484511
# ------------------
485512
# Look for Boost.Conversion (cast / lexical_cast)

0 commit comments

Comments
 (0)