summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-03-17 11:12:14 +0100
committerCarl Hetherington <cth@carlh.net>2021-03-18 09:48:27 +0100
commit8aa97c043d73e0c6c8bc484a307b944702c7d3dd (patch)
tree15346fdf1bbedbf70ff0932cef7fc70c1c7585b1 /wscript
parente9552854d7a48550d2491665b074adb46ba21b5f (diff)
Require boost 1.61.0 or above on Windows/macOS.
Diffstat (limited to 'wscript')
-rw-r--r--wscript14
1 files changed, 9 insertions, 5 deletions
diff --git a/wscript b/wscript
index 016feaa66..4b3164f71 100644
--- a/wscript
+++ b/wscript
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2012-2019 Carl Hetherington <cth@carlh.net>
+# Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
#
# This file is part of DCP-o-matic.
#
@@ -476,6 +476,10 @@ def configure(conf):
if conf.env.TARGET_LINUX:
conf.env.LIB_X11 = ['X11']
+ # We support older boosts on Linux so we can use the distribution-provided package
+ # on Centos 7, but it's good if we can use 1.61 for boost::dll::program_location()
+ boost_version = ('1.45', '104500') if conf.env.TARGET_LINUX else ('1.61', '106800')
+
# Boost
if conf.options.static_boost:
conf.env.STLIB_BOOST_THREAD = ['boost_thread']
@@ -487,15 +491,15 @@ def configure(conf):
else:
conf.check_cxx(fragment="""
#include <boost/version.hpp>\n
- #if BOOST_VERSION < 104500\n
+ #if BOOST_VERSION < %s\n
#error boost too old\n
#endif\n
int main(void) { return 0; }\n
- """,
+ """ % boost_version[1],
mandatory=True,
- msg='Checking for boost library >= 1.45',
+ msg='Checking for boost library >= %s' % boost_version[0],
okmsg='yes',
- errmsg='too old\nPlease install boost version 1.45 or higher.')
+ errmsg='too old\nPlease install boost version %s or higher.' % boost_version[0])
conf.check_cxx(fragment="""
#include <boost/thread.hpp>\n