Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit399f4d9

Browse files
committed
build: more accurate dependencies on Boost libraries
See alsonamed-data/ndn-cxx@5686c51Change-Id: I44f01b8dad76bf835d05f920a7943eeae3eb8c6f
1 parent4cd7801 commit399f4d9

File tree

6 files changed

+36
-32
lines changed

6 files changed

+36
-32
lines changed

‎examples/wscript‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
top='..'
44

55
defbuild(bld):
6+
# List all .cpp files (whole example in one .cpp)
67
forexinbld.path.ant_glob('*.cpp'):
78
name=ex.change_ext('').path_from(bld.path.get_bld())
8-
bld.program(name='example-%s'%name,
9+
bld.program(name=f'example-{name}',
910
target=name,
1011
source=[ex],
1112
use='NDN_CXX',
12-
includes='../src',
1313
install_path=None)

‎tests/wscript‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ top = '..'
55
defbuild(bld):
66
bld.objects(target='tests-base',
77
source=bld.path.ant_glob('*.cpp'),
8-
use='repo-objects')
8+
use='BOOST_TESTSrepo-objects')
99

1010
bld.program(name='unit-tests',
11-
target='../unit-tests',
11+
target=f'{top}/unit-tests',
1212
source=bld.path.ant_glob('unit/**/*.cpp'),
1313
use='tests-base',
1414
install_path=None)
1515

1616
bld.program(name='integrated-tests',
17-
target='../integrated-tests',
17+
target=f'{top}/integrated-tests',
1818
source=bld.path.ant_glob('integrated/**/*.cpp'),
1919
use='tests-base',
2020
install_path=None)

‎tools/ndnputfile.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*-*/
22
/*
3-
* Copyright (c) 2014-2022, Regents of the University of California.
3+
* Copyright (c) 2014-2023, Regents of the University of California.
44
*
55
* This file is part of NDN repo-ng (Next generation of NDN repository).
66
* See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -17,8 +17,8 @@
1717
* repo-ng, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
1818
*/
1919

20-
#include"../src/repo-command-parameter.hpp"
21-
#include"../src/repo-command-response.hpp"
20+
#include"repo-command-parameter.hpp"
21+
#include"repo-command-response.hpp"
2222

2323
#include<ndn-cxx/face.hpp>
2424
#include<ndn-cxx/security/interest-signer.hpp>

‎tools/repo-ng-ls.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*-*/
22
/*
3-
* Copyright (c) 2014-2019, Regents of the University of California.
3+
* Copyright (c) 2014-2023, Regents of the University of California.
44
*
55
* This file is part of NDN repo-ng (Next generation of NDN repository).
66
* See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -17,7 +17,7 @@
1717
* repo-ng, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
1818
*/
1919

20-
#include"../src/common.hpp"
20+
#include"common.hpp"
2121

2222
#include<iostream>
2323
#include<string>

‎tools/wscript‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ def build(bld):
66
fortoolinbld.path.ant_glob('*.cpp'):
77
name=tool.change_ext('').path_from(bld.path.get_bld())
88
bld.program(name=name,
9-
target='../bin/%s'%name,
9+
target=f'{top}/bin/{name}',
1010
source=[tool],
11-
use='repo-objects')
11+
use='BOOST_TOOLSrepo-objects')

‎wscript‎

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
22

3-
fromwaflibimportUtils
43
importos
4+
fromwaflibimportUtils
55

66
VERSION='0.1'
77
APPNAME='ndn-repo-ng'
@@ -39,11 +39,13 @@ def configure(conf):
3939

4040
conf.check_sqlite3()
4141

42-
boost_libs= ['system','program_options','filesystem','iostreams']
42+
conf.check_boost(lib='filesystem program_options',mt=True)
43+
4344
ifconf.env.WITH_TESTS:
44-
boost_libs.append('unit_test_framework')
45+
conf.check_boost(lib='unit_test_framework',mt=True,uselib_store='BOOST_TESTS')
4546

46-
conf.check_boost(lib=boost_libs,mt=True)
47+
ifconf.env.WITH_TOOLS:
48+
conf.check_boost(lib='iostreams',mt=True,uselib_store='BOOST_TOOLS')
4749

4850
conf.check_compiler_flags()
4951

@@ -53,35 +55,37 @@ def configure(conf):
5355

5456
conf.define_cond('HAVE_TESTS',conf.env.WITH_TESTS)
5557
conf.define_cond('DISABLE_SQLITE3_FS_LOCKING',notconf.options.with_sqlite_locking)
56-
conf.define('DEFAULT_CONFIG_FILE','%s/ndn/repo-ng.conf'%conf.env.SYSCONFDIR)
58+
conf.define('DEFAULT_CONFIG_FILE',f'{conf.env.SYSCONFDIR}/ndn/repo-ng.conf')
5759
conf.write_config_header('src/config.hpp')
5860

5961
defbuild(bld):
60-
bld.objects(target='repo-objects',
61-
source=bld.path.ant_glob('src/**/*.cpp',
62-
excl=['src/main.cpp']),
63-
use='NDN_CXX BOOST SQLITE3',
64-
includes='src',
65-
export_includes='src')
66-
67-
bld.program(name='ndn-repo-ng',
68-
target='bin/ndn-repo-ng',
69-
source='src/main.cpp',
70-
use='repo-objects')
71-
72-
ifbld.env.WITH_TOOLS:
73-
bld.recurse('tools')
62+
bld.objects(
63+
target='repo-objects',
64+
source=bld.path.ant_glob('src/**/*.cpp',excl=['src/main.cpp']),
65+
use='BOOST NDN_CXX SQLITE3',
66+
includes='src',
67+
export_includes='src')
68+
69+
bld.program(
70+
name='ndn-repo-ng',
71+
target='bin/ndn-repo-ng',
72+
source='src/main.cpp',
73+
use='repo-objects')
7474

7575
ifbld.env.WITH_TESTS:
7676
bld.recurse('tests')
7777

78+
ifbld.env.WITH_TOOLS:
79+
bld.recurse('tools')
80+
7881
ifbld.env.WITH_EXAMPLES:
7982
bld.recurse('examples')
8083

84+
# Install sample config
8185
bld.install_files('${SYSCONFDIR}/ndn','repo-ng.conf.sample')
8286

8387
ifUtils.unversioned_sys_platform()=='linux':
8488
bld(features='subst',
85-
name='repo-ng.service',
89+
name='systemd-units',
8690
source='systemd/repo-ng.service.in',
8791
target='systemd/repo-ng.service')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp