0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 17:10:48 +01:00

SERVER-11622 Check for boost 1.49 or better during configure

This commit is contained in:
Jonathan Reams 2015-02-10 17:54:43 -05:00
parent ed49b537b9
commit 439ecb677c

View File

@ -2063,7 +2063,23 @@ def doConfigure(myenv):
myenv = conf.Finish()
conf = Configure(myenv)
def CheckBoostMinVersion(context):
compile_test_body = textwrap.dedent("""
#include <boost/version.hpp>
#if BOOST_VERSION < 104900
#error
#endif
""")
context.Message("Checking if system boost version is 1.49 or newer...")
result = context.TryCompile(compile_test_body, ".cpp")
context.Result(result)
return result
conf = Configure(myenv, custom_tests = {
'CheckBoostMinVersion': CheckBoostMinVersion,
})
libdeps.setup_conftests(conf)
if use_system_version_of_library("pcre"):
@ -2092,6 +2108,9 @@ def doConfigure(myenv):
if not conf.CheckCXXHeader( "boost/filesystem/operations.hpp" ):
print( "can't find boost headers" )
Exit(1)
if not conf.CheckBoostMinVersion():
print( "system's version of boost is too old. version 1.49 or better required")
Exit(1)
conf.env.Append(CPPDEFINES=[("BOOST_THREAD_VERSION", "2")])