build: decouple handling of boost libs not needed by libndn-cxx

Refs: #5210
Change-Id: Ia8e3d80dd92b5e8a7bd7d79ea811332220a883ed
This commit is contained in:
Davide Pesavento committed 2023-09-07 22:08:46 -04:00
1 parent c996742bad
commit 5686c51b87
3 files changed
+9 -6

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ def build(bld):
source=bld.path.ant_glob('*.cpp'),
features='pch',
headers='tests-pch.hpp',
use='ndn-cxx BOOST')
use='BOOST_TESTS ndn-cxx')
bld.recurse('benchmarks')
bld.recurse('integration')
+1 -1
View File
@@ -7,7 +7,7 @@ def build(bld):
source=bld.path.ant_glob('*.cpp', excl=['main.cpp']),
features='pch',
headers='ndnsec-pch.hpp',
use='ndn-cxx')
use='BOOST_TOOLS ndn-cxx')
bld.program(name='tool-ndnsec',
target=top + 'bin/ndnsec',
+7 -4
View File
@@ -103,7 +103,7 @@ def configure(conf):
conf.check_sqlite3()
conf.check_openssl(lib='crypto', atleast_version='1.1.1')
boost_libs = ['system', 'program_options', 'chrono', 'date_time', 'filesystem', 'thread', 'log']
boost_libs = ['system', 'chrono', 'date_time', 'filesystem', 'thread', 'log']
stacktrace_backend = conf.options.with_stacktrace
if stacktrace_backend is None:
@@ -120,9 +120,6 @@ def configure(conf):
conf.env.append_unique('DEFINES_BOOST', ['BOOST_STACKTRACE_DYN_LINK'])
boost_libs.append(f'stacktrace_{stacktrace_backend}')
if conf.env.WITH_TESTS:
boost_libs.append('unit_test_framework')
conf.check_boost(lib=boost_libs, mt=True)
if conf.env.BOOST_VERSION_NUMBER < 106501:
conf.fatal('The minimum supported version of Boost is 1.65.1.\n'
@@ -135,6 +132,12 @@ def configure(conf):
conf.env.append_unique('DEFINES_BOOST', ['BOOST_FILESYSTEM_NO_DEPRECATED'])
if conf.env.WITH_TESTS:
conf.check_boost(lib='unit_test_framework', mt=True, uselib_store='BOOST_TESTS')
if conf.env.WITH_TOOLS:
conf.check_boost(lib='program_options', mt=True, uselib_store='BOOST_TOOLS')
conf.check_compiler_flags()
# Loading "late" to prevent tests from being compiled with profiling flags