Skip to content

Commit 6ccf63b

Browse files
authored
Merge pull request #138 from grafikrobot/modular
Add support for modular build structure.
2 parents ca9ed9b + 96078fd commit 6ccf63b

File tree

6 files changed

+113
-57
lines changed

6 files changed

+113
-57
lines changed

.github/workflows/ci.yml

Lines changed: 61 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -19,99 +19,112 @@ jobs:
1919
include:
2020
- toolset: gcc-4.8
2121
cxxstd: "11"
22-
os: ubuntu-latest
2322
container: ubuntu:18.04
23+
os: ubuntu-latest
2424
install: g++-4.8
2525
- toolset: gcc-5
2626
cxxstd: "11,14,1z"
27-
os: ubuntu-latest
2827
container: ubuntu:18.04
28+
os: ubuntu-latest
2929
install: g++-5
3030
- toolset: gcc-6
3131
cxxstd: "11,14,1z"
32-
os: ubuntu-latest
3332
container: ubuntu:18.04
33+
os: ubuntu-latest
3434
install: g++-6
3535
- toolset: gcc-7
3636
cxxstd: "11,14,17"
37-
os: ubuntu-20.04
37+
container: ubuntu:20.04
38+
os: ubuntu-latest
3839
install: g++-7
3940
- toolset: gcc-8
4041
cxxstd: "11,14,17,2a"
41-
os: ubuntu-20.04
42+
container: ubuntu:20.04
43+
os: ubuntu-latest
4244
install: g++-8
4345
- toolset: gcc-9
4446
cxxstd: "11,14,17,2a"
45-
os: ubuntu-20.04
47+
container: ubuntu:20.04
48+
os: ubuntu-latest
4649
- toolset: gcc-10
4750
cxxstd: "11,14,17,2a"
48-
os: ubuntu-20.04
51+
container: ubuntu:20.04
52+
os: ubuntu-latest
4953
install: g++-10
5054
- toolset: gcc-11
5155
cxxstd: "11,14,17,2a"
52-
os: ubuntu-20.04
56+
container: ubuntu:22.04
57+
os: ubuntu-latest
5358
install: g++-11
5459
- toolset: gcc-12
5560
cxxstd: "11,14,17,20,2b"
56-
os: ubuntu-22.04
61+
container: ubuntu:22.04
62+
os: ubuntu-latest
5763
install: g++-12
5864
- toolset: gcc-13
5965
cxxstd: "11,14,17,20,2b"
66+
container: ubuntu:24.04
6067
os: ubuntu-latest
61-
container: ubuntu:23.04
6268
install: g++-13
6369
- toolset: clang
6470
compiler: clang++-3.9
6571
cxxstd: "11,14"
66-
os: ubuntu-latest
6772
container: ubuntu:18.04
73+
os: ubuntu-latest
6874
install: clang-3.9
6975
- toolset: clang
7076
compiler: clang++-4.0
7177
cxxstd: "11,14"
72-
os: ubuntu-latest
7378
container: ubuntu:18.04
79+
os: ubuntu-latest
7480
install: clang-4.0
7581
- toolset: clang
7682
compiler: clang++-5.0
7783
cxxstd: "11,14,1z"
78-
os: ubuntu-latest
7984
container: ubuntu:18.04
85+
os: ubuntu-latest
8086
install: clang-5.0
8187
- toolset: clang
8288
compiler: clang++-6.0
8389
cxxstd: "11,14,17"
84-
os: ubuntu-20.04
90+
container: ubuntu:20.04
91+
os: ubuntu-latest
8592
install: clang-6.0
8693
- toolset: clang
8794
compiler: clang++-7
8895
cxxstd: "11,14,17"
89-
os: ubuntu-20.04
96+
container: ubuntu:20.04
97+
os: ubuntu-latest
9098
install: clang-7
9199
- toolset: clang
92100
compiler: clang++-8
93101
cxxstd: "11,14,17"
94-
os: ubuntu-20.04
102+
container: ubuntu:20.04
103+
os: ubuntu-latest
95104
install: clang-8
96105
- toolset: clang
97106
compiler: clang++-9
98107
cxxstd: "11,14,17,2a"
99-
os: ubuntu-20.04
108+
container: ubuntu:20.04
109+
os: ubuntu-latest
100110
install: clang-9
101111
- toolset: clang
102112
compiler: clang++-10
103113
cxxstd: "11,14,17,2a"
104-
os: ubuntu-20.04
114+
container: ubuntu:20.04
115+
os: ubuntu-latest
105116
install: clang-10
106117
- toolset: clang
107118
compiler: clang++-11
108119
cxxstd: "11,14,17,2a"
109-
os: ubuntu-20.04
120+
container: ubuntu:20.04
121+
os: ubuntu-latest
110122
install: clang-11
111123
- toolset: clang
112124
compiler: clang++-12
113125
cxxstd: "11,14,17,2a"
114-
os: ubuntu-20.04
126+
container: ubuntu:20.04
127+
os: ubuntu-latest
115128
install: clang-12
116129
- toolset: clang
117130
compiler: clang++-13
@@ -134,34 +147,45 @@ jobs:
134147
- toolset: clang
135148
compiler: clang++-16
136149
cxxstd: "11,14,17,20,2b"
137-
container: ubuntu:23.04
150+
container: ubuntu:24.04
138151
os: ubuntu-latest
139152
install: clang-16
140153
- toolset: clang
141154
compiler: clang++-17
142155
cxxstd: "11,14,17,20,2b"
143-
container: ubuntu:23.10
156+
container: ubuntu:24.10
144157
os: ubuntu-latest
145158
install: clang-17
146-
- toolset: clang
147-
cxxstd: "11,14,17,2a"
148-
os: macos-11
149159
- toolset: clang
150160
cxxstd: "11,14,17,20,2b"
151-
os: macos-12
161+
os: macos-13
152162
- toolset: clang
153163
cxxstd: "11,14,17,20,2b"
154-
os: macos-13
164+
os: macos-14
165+
- toolset: clang
166+
cxxstd: "11,14,17,20,23"
167+
os: macos-15
155168

156169
runs-on: ${{matrix.os}}
157-
container: ${{matrix.container}}
170+
container:
171+
image: ${{matrix.container}}
172+
volumes:
173+
- /node20217:/node20217:rw,rshared
174+
- ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
158175

159176
defaults:
160177
run:
161178
shell: bash
162179

163180
steps:
164-
- uses: actions/checkout@v3
181+
- name: Install nodejs20glibc2.17
182+
if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }}
183+
run: |
184+
set -x
185+
apt-get update
186+
apt-get install -y curl xz-utils
187+
curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz
188+
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
165189
166190
- name: Setup container environment
167191
if: matrix.container
@@ -175,6 +199,8 @@ jobs:
175199
sudo apt-get update
176200
sudo apt-get -y install ${{matrix.install}}
177201
202+
- uses: actions/checkout@v4
203+
178204
- name: Setup Boost
179205
run: |
180206
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
@@ -273,9 +299,9 @@ jobs:
273299
include:
274300
- os: ubuntu-20.04
275301
- os: ubuntu-22.04
276-
- os: macos-11
277-
- os: macos-12
278302
- os: macos-13
303+
- os: macos-14
304+
- os: macos-15
279305

280306
runs-on: ${{matrix.os}}
281307

@@ -321,9 +347,9 @@ jobs:
321347
include:
322348
- os: ubuntu-20.04
323349
- os: ubuntu-22.04
324-
- os: macos-11
325-
- os: macos-12
326350
- os: macos-13
351+
- os: macos-14
352+
- os: macos-15
327353

328354
runs-on: ${{matrix.os}}
329355

@@ -379,9 +405,9 @@ jobs:
379405
include:
380406
- os: ubuntu-20.04
381407
- os: ubuntu-22.04
382-
- os: macos-11
383-
- os: macos-12
384408
- os: macos-13
409+
- os: macos-14
410+
- os: macos-15
385411

386412
runs-on: ${{matrix.os}}
387413

Jamfile

Lines changed: 0 additions & 11 deletions
This file was deleted.

build.jam

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright René Ferdinand Rivera Morell 2023-2024
2+
# Distributed under the Boost Software License, Version 1.0.
3+
# (See accompanying file LICENSE_1_0.txt or copy at
4+
# http://www.boost.org/LICENSE_1_0.txt)
5+
6+
require-b2 5.2 ;
7+
8+
constant boost_dependencies :
9+
/boost/any//boost_any
10+
/boost/config//boost_config
11+
/boost/core//boost_core
12+
/boost/detail//boost_detail
13+
/boost/function//boost_function
14+
/boost/iterator//boost_iterator
15+
/boost/lexical_cast//boost_lexical_cast
16+
/boost/smart_ptr//boost_smart_ptr
17+
/boost/static_assert//boost_static_assert
18+
/boost/throw_exception//boost_throw_exception
19+
/boost/type_traits//boost_type_traits ;
20+
21+
project /boost/program_options
22+
;
23+
24+
explicit
25+
[ alias boost_program_options : build//boost_program_options ]
26+
[ alias all : boost_program_options example test ]
27+
;
28+
29+
call-if : boost-library program_options
30+
: install boost_program_options
31+
;
32+

build/Jamfile.v2

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11

2-
project boost/program_options
3-
: source-location ../src
2+
constant boost_dependencies_private :
3+
/boost/bind//boost_bind
4+
/boost/tokenizer//boost_tokenizer
5+
;
6+
7+
project
8+
: source-location ../src
9+
: common-requirements <include>../include <library>$(boost_dependencies)
10+
: requirements <library>$(boost_dependencies_private)
411
;
512

613
SOURCES =
7-
cmdline config_file options_description parsers variables_map
14+
cmdline config_file options_description parsers variables_map
815
value_semantic positional_options utf8_codecvt_facet
916
convert winmain split
1017
;
1118

12-
boost-lib program_options
19+
lib boost_program_options
1320
: $(SOURCES).cpp
1421
: # See https://svn.boost.org/trac/boost/ticket/5049
1522
<target-os>hpux,<toolset>gcc:<define>_INCLUDE_STDC__SOURCE_199901
16-
;
23+
<link>shared:<define>BOOST_PROGRAM_OPTIONS_DYN_LINK=1
24+
<define>BOOST_PROGRAM_OPTIONS_NO_LIB=1
25+
;

doc/Jamfile.v2

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
import toolset ;
33
toolset.using doxygen ;
44

5-
boostbook program_option
6-
: program_options.xml
7-
: <implicit-dependency>autodoc
5+
boostbook program_option
6+
: program_options.xml
7+
: <implicit-dependency>autodoc
88
<xsl:param>boost.root=../../../..
99
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
1010
;
1111

12-
doxygen autodoc
13-
: [ glob ../../../boost/program_options/*.hpp ] ;
12+
doxygen autodoc
13+
: [ glob ../include/boost/program_options/*.hpp ] ;
1414

1515
###############################################################################
1616
alias boostdoc

test/Jamfile.v2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ test-suite program_options :
3838
[ run options_description_test.cpp : : : <rtti>off : options_description_no_rtti_test ]
3939
;
4040

41-
exe test_convert : test_convert.cpp ;
41+
exe test_convert : test_convert.cpp /boost/timer//boost_timer ;
4242

4343
# `quick` target (for CI)
4444
run quick.cpp : --path=initial ;

0 commit comments

Comments
 (0)