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:
parent
ed49b537b9
commit
439ecb677c
21
SConstruct
21
SConstruct
@ -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")])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user