Skip to content

Add support for modular build structure. #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 61 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,99 +19,112 @@ jobs:
include:
- toolset: gcc-4.8
cxxstd: "11"
os: ubuntu-latest
container: ubuntu:18.04
os: ubuntu-latest
install: g++-4.8
- toolset: gcc-5
cxxstd: "11,14,1z"
os: ubuntu-latest
container: ubuntu:18.04
os: ubuntu-latest
install: g++-5
- toolset: gcc-6
cxxstd: "11,14,1z"
os: ubuntu-latest
container: ubuntu:18.04
os: ubuntu-latest
install: g++-6
- toolset: gcc-7
cxxstd: "11,14,17"
os: ubuntu-20.04
container: ubuntu:20.04
os: ubuntu-latest
install: g++-7
- toolset: gcc-8
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
container: ubuntu:20.04
os: ubuntu-latest
install: g++-8
- toolset: gcc-9
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
container: ubuntu:20.04
os: ubuntu-latest
- toolset: gcc-10
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
container: ubuntu:20.04
os: ubuntu-latest
install: g++-10
- toolset: gcc-11
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
container: ubuntu:22.04
os: ubuntu-latest
install: g++-11
- toolset: gcc-12
cxxstd: "11,14,17,20,2b"
os: ubuntu-22.04
container: ubuntu:22.04
os: ubuntu-latest
install: g++-12
- toolset: gcc-13
cxxstd: "11,14,17,20,2b"
container: ubuntu:24.04
os: ubuntu-latest
container: ubuntu:23.04
install: g++-13
- toolset: clang
compiler: clang++-3.9
cxxstd: "11,14"
os: ubuntu-latest
container: ubuntu:18.04
os: ubuntu-latest
install: clang-3.9
- toolset: clang
compiler: clang++-4.0
cxxstd: "11,14"
os: ubuntu-latest
container: ubuntu:18.04
os: ubuntu-latest
install: clang-4.0
- toolset: clang
compiler: clang++-5.0
cxxstd: "11,14,1z"
os: ubuntu-latest
container: ubuntu:18.04
os: ubuntu-latest
install: clang-5.0
- toolset: clang
compiler: clang++-6.0
cxxstd: "11,14,17"
os: ubuntu-20.04
container: ubuntu:20.04
os: ubuntu-latest
install: clang-6.0
- toolset: clang
compiler: clang++-7
cxxstd: "11,14,17"
os: ubuntu-20.04
container: ubuntu:20.04
os: ubuntu-latest
install: clang-7
- toolset: clang
compiler: clang++-8
cxxstd: "11,14,17"
os: ubuntu-20.04
container: ubuntu:20.04
os: ubuntu-latest
install: clang-8
- toolset: clang
compiler: clang++-9
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
container: ubuntu:20.04
os: ubuntu-latest
install: clang-9
- toolset: clang
compiler: clang++-10
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
container: ubuntu:20.04
os: ubuntu-latest
install: clang-10
- toolset: clang
compiler: clang++-11
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
container: ubuntu:20.04
os: ubuntu-latest
install: clang-11
- toolset: clang
compiler: clang++-12
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
container: ubuntu:20.04
os: ubuntu-latest
install: clang-12
- toolset: clang
compiler: clang++-13
Expand All @@ -134,34 +147,45 @@ jobs:
- toolset: clang
compiler: clang++-16
cxxstd: "11,14,17,20,2b"
container: ubuntu:23.04
container: ubuntu:24.04
os: ubuntu-latest
install: clang-16
- toolset: clang
compiler: clang++-17
cxxstd: "11,14,17,20,2b"
container: ubuntu:23.10
container: ubuntu:24.10
os: ubuntu-latest
install: clang-17
- toolset: clang
cxxstd: "11,14,17,2a"
os: macos-11
- toolset: clang
cxxstd: "11,14,17,20,2b"
os: macos-12
os: macos-13
- toolset: clang
cxxstd: "11,14,17,20,2b"
os: macos-13
os: macos-14
- toolset: clang
cxxstd: "11,14,17,20,23"
os: macos-15

runs-on: ${{matrix.os}}
container: ${{matrix.container}}
container:
image: ${{matrix.container}}
volumes:
- /node20217:/node20217:rw,rshared
- ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}

defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v3
- name: Install nodejs20glibc2.17
if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }}
run: |
set -x
apt-get update
apt-get install -y curl xz-utils
curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217

- name: Setup container environment
if: matrix.container
Expand All @@ -175,6 +199,8 @@ jobs:
sudo apt-get update
sudo apt-get -y install ${{matrix.install}}

- uses: actions/checkout@v4

- name: Setup Boost
run: |
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
Expand Down Expand Up @@ -273,9 +299,9 @@ jobs:
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
- os: macos-11
- os: macos-12
- os: macos-13
- os: macos-14
- os: macos-15

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

Expand Down Expand Up @@ -321,9 +347,9 @@ jobs:
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
- os: macos-11
- os: macos-12
- os: macos-13
- os: macos-14
- os: macos-15

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

Expand Down Expand Up @@ -379,9 +405,9 @@ jobs:
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
- os: macos-11
- os: macos-12
- os: macos-13
- os: macos-14
- os: macos-15

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

Expand Down
11 changes: 0 additions & 11 deletions Jamfile

This file was deleted.

32 changes: 32 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright René Ferdinand Rivera Morell 2023-2024
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

require-b2 5.2 ;

constant boost_dependencies :
/boost/any//boost_any
/boost/config//boost_config
/boost/core//boost_core
/boost/detail//boost_detail
/boost/function//boost_function
/boost/iterator//boost_iterator
/boost/lexical_cast//boost_lexical_cast
/boost/smart_ptr//boost_smart_ptr
/boost/static_assert//boost_static_assert
/boost/throw_exception//boost_throw_exception
/boost/type_traits//boost_type_traits ;

project /boost/program_options
;

explicit
[ alias boost_program_options : build//boost_program_options ]
[ alias all : boost_program_options example test ]
;

call-if : boost-library program_options
: install boost_program_options
;

19 changes: 14 additions & 5 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@

project boost/program_options
: source-location ../src
constant boost_dependencies_private :
/boost/bind//boost_bind
/boost/tokenizer//boost_tokenizer
;

project
: source-location ../src
: common-requirements <include>../include <library>$(boost_dependencies)
: requirements <library>$(boost_dependencies_private)
;

SOURCES =
cmdline config_file options_description parsers variables_map
cmdline config_file options_description parsers variables_map
value_semantic positional_options utf8_codecvt_facet
convert winmain split
;

boost-lib program_options
lib boost_program_options
: $(SOURCES).cpp
: # See https://svn.boost.org/trac/boost/ticket/5049
<target-os>hpux,<toolset>gcc:<define>_INCLUDE_STDC__SOURCE_199901
;
<link>shared:<define>BOOST_PROGRAM_OPTIONS_DYN_LINK=1
<define>BOOST_PROGRAM_OPTIONS_NO_LIB=1
;
10 changes: 5 additions & 5 deletions doc/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
import toolset ;
toolset.using doxygen ;

boostbook program_option
: program_options.xml
: <implicit-dependency>autodoc
boostbook program_option
: program_options.xml
: <implicit-dependency>autodoc
<xsl:param>boost.root=../../../..
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
;

doxygen autodoc
: [ glob ../../../boost/program_options/*.hpp ] ;
doxygen autodoc
: [ glob ../include/boost/program_options/*.hpp ] ;

###############################################################################
alias boostdoc
Expand Down
2 changes: 1 addition & 1 deletion test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test-suite program_options :
[ run options_description_test.cpp : : : <rtti>off : options_description_no_rtti_test ]
;

exe test_convert : test_convert.cpp ;
exe test_convert : test_convert.cpp /boost/timer//boost_timer ;

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