Merge pull request #382 from grafikrobot/modular

Add support for modular build structure.
This commit is contained in:
Jeremy W. Murphy 2025-05-02 13:23:31 +09:00 committed by GitHub
commit f2f55c2062
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 114 additions and 41 deletions

View File

@ -7,16 +7,15 @@
name: CI name: CI
on: [ push, pull_request ] on: [ push, pull_request ]
jobs: jobs:
ubuntu-focal: ubuntu:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
# Removed g++-10 because of an ICE; meant to be fixed in 10.2? compiler: [ gcc-14, clang-19 ]
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94938 cxxstd: [ 14, 17, 20, 23 ]
compiler: [ g++-9, clang++-10 ]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@master
with: with:
fetch-depth: '0' fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1 - uses: mstachniuk/ci-skip@v1
@ -24,12 +23,12 @@ jobs:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]' commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
commit-filter-separator: ';' commit-filter-separator: ';'
fail-fast: true fail-fast: true
- name: Set TOOLSET - name: Set ENV
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV run: |
- name: Add repository echo ${{ matrix.compiler }} | awk '/^gcc/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test" echo ${{ matrix.compiler }} | awk '/^gcc/ { gsub(/gcc/,"CXX=g++"); print; } /^clang/ { gsub(/clang/,"CXX=clang++"); print; }' >> $GITHUB_ENV
- name: Install packages - name: Install packages
run: sudo apt install g++-9 clang-10 run: sudo apt install ${{ matrix.compiler }}
- name: Checkout main boost - name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep - name: Update tools/boostdep
@ -48,13 +47,13 @@ jobs:
run: ./b2 headers run: ./b2 headers
working-directory: ../boost-root working-directory: ../boost-root
- name: Generate user config - name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} ;" > ~/user-config.jam' run: 'echo "using $TOOLSET : : $CXX ;" > ~/user-config.jam'
working-directory: ../boost-root working-directory: ../boost-root
- name: Config info - name: Config info
run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=14,17,2a run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=${{ matrix.cxxstd }}
working-directory: ../boost-root/libs/config/test working-directory: ../boost-root/libs/config/test
- name: Test - name: Test
run: ../../../b2 toolset=$TOOLSET cxxstd=14,17,2a run: ../../../b2 toolset=$TOOLSET cxxstd=${{ matrix.cxxstd }}
working-directory: ../boost-root/libs/graph/test working-directory: ../boost-root/libs/graph/test
macos: macos:
runs-on: macos-latest runs-on: macos-latest
@ -62,8 +61,9 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
toolset: [ clang ] toolset: [ clang ]
cxxstd: [ 14, 17, 20 ]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@master
with: with:
fetch-depth: '0' fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1 - uses: mstachniuk/ci-skip@v1
@ -89,10 +89,10 @@ jobs:
run: ./b2 headers run: ./b2 headers
working-directory: ../boost-root working-directory: ../boost-root
- name: Config info - name: Config info
run: ../../../b2 print_config_info toolset=${{ matrix.toolset }} cxxstd=14,17,2a run: ../../../b2 print_config_info toolset=${{ matrix.toolset }} cxxstd=${{ matrix.cxxstd }}
working-directory: ../boost-root/libs/config/test working-directory: ../boost-root/libs/config/test
- name: Test - name: Test
run: ../../../b2 toolset=${{ matrix.toolset }} cxxstd=14,17,2a define=CI_SUPPRESS_KNOWN_ISSUES run: ../../../b2 toolset=${{ matrix.toolset }} cxxstd=${{ matrix.cxxstd }} define=CI_SUPPRESS_KNOWN_ISSUES
working-directory: ../boost-root/libs/graph/test working-directory: ../boost-root/libs/graph/test
windows_msvc_14_2: windows_msvc_14_2:
runs-on: windows-2019 runs-on: windows-2019
@ -182,7 +182,6 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- os: ubuntu-20.04
- os: ubuntu-22.04 - os: ubuntu-22.04
- os: ubuntu-24.04 - os: ubuntu-24.04
- os: macos-13 - os: macos-13
@ -231,7 +230,6 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- os: ubuntu-20.04
- os: ubuntu-22.04 - os: ubuntu-22.04
- os: ubuntu-24.04 - os: ubuntu-24.04
- os: macos-13 - os: macos-13

61
build.jam Normal file
View File

@ -0,0 +1,61 @@
# Copyright René Ferdinand Rivera Morell 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/algorithm//boost_algorithm
/boost/any//boost_any
/boost/array//boost_array
/boost/assert//boost_assert
/boost/bimap//boost_bimap
/boost/bind//boost_bind
/boost/concept_check//boost_concept_check
/boost/config//boost_config
/boost/container_hash//boost_container_hash
/boost/conversion//boost_conversion
/boost/core//boost_core
/boost/detail//boost_detail
/boost/foreach//boost_foreach
/boost/function//boost_function
/boost/integer//boost_integer
/boost/iterator//boost_iterator
/boost/lexical_cast//boost_lexical_cast
/boost/math//boost_math_tr1
/boost/move//boost_move
/boost/mpl//boost_mpl
/boost/multi_index//boost_multi_index
/boost/optional//boost_optional
/boost/parameter//boost_parameter
/boost/preprocessor//boost_preprocessor
/boost/property_map//boost_property_map
/boost/property_tree//boost_property_tree
/boost/random//boost_random
/boost/range//boost_range
/boost/serialization//boost_serialization
/boost/smart_ptr//boost_smart_ptr
/boost/spirit//boost_spirit
/boost/static_assert//boost_static_assert
/boost/throw_exception//boost_throw_exception
/boost/tti//boost_tti
/boost/tuple//boost_tuple
/boost/type_traits//boost_type_traits
/boost/typeof//boost_typeof
/boost/unordered//boost_unordered
/boost/utility//boost_utility
/boost/xpressive//boost_xpressive ;
project /boost/graph
;
explicit
[ alias boost_graph : build//boost_graph ]
[ alias all : boost_graph example test ]
;
call-if : boost-library graph
: install boost_graph
;

View File

@ -6,9 +6,15 @@
import mpi ; import mpi ;
project boost/graph constant boost_dependencies_private :
: requirements <include>../src /boost/regex//boost_regex
;
project
: common-requirements <include>../include <library>$(boost_dependencies)
: requirements <include>../src <library>$(boost_dependencies_private)
: source-location ../src : source-location ../src
: usage-requirements <define>BOOST_GRAPH_NO_LIB=1
; ;
lib boost_graph lib boost_graph
@ -24,5 +30,3 @@ lib boost_graph
: :
: :
; ;
boost-install boost_graph ;

View File

@ -3,12 +3,17 @@
# Distributed under the Boost Software License, Version 1.0. (See accompanying # 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) # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
import ../../config/checks/config : requires ; require-b2 5.0.1 ;
import-search /boost/config/checks ;
import config : requires ;
import modules ; import modules ;
import path ; import path ;
path-constant TEST_DIR : . ; path-constant TEST_DIR : . ;
project : requirements <library>/boost/graph//boost_graph ;
run accum-compile-times.cpp : $(TEST_DIR)/makefile-dependencies.dat $(TEST_DIR)/makefile-target-names.dat $(TEST_DIR)/target-compile-costs.dat ; run accum-compile-times.cpp : $(TEST_DIR)/makefile-dependencies.dat $(TEST_DIR)/makefile-target-names.dat $(TEST_DIR)/target-compile-costs.dat ;
exe actor_clustering : actor_clustering.cpp ; exe actor_clustering : actor_clustering.cpp ;
run adj_list_ra_edgelist.cpp ; run adj_list_ra_edgelist.cpp ;
@ -75,15 +80,15 @@ run filtered_graph.cpp ;
run filtered_graph_edge_range.cpp ; run filtered_graph_edge_range.cpp ;
run filtered_vec_as_graph.cpp ; run filtered_vec_as_graph.cpp ;
run filtered-copy-example.cpp ; run filtered-copy-example.cpp ;
exe fr_layout : fr_layout.cpp : [ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ] ; exe fr_layout : fr_layout.cpp /boost/timer//boost_timer : [ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ] ;
run gerdemann.cpp ; run gerdemann.cpp ;
run graph.cpp ; run graph.cpp ;
run graph_as_tree.cpp ; run graph_as_tree.cpp ;
run graph_property.cpp ; run graph_property.cpp ;
run graph-assoc-types.cpp ; run graph-assoc-types.cpp ;
run graph-property-iter-eg.cpp ; run graph-property-iter-eg.cpp ;
run graph-thingie.cpp ../build//boost_graph ; run graph-thingie.cpp /boost/graph//boost_graph ;
run graphviz.cpp ../build//boost_graph : $(TEST_DIR)/graphviz_example.dot ; run graphviz.cpp /boost/graph//boost_graph : $(TEST_DIR)/graphviz_example.dot ;
run grid_graph_example.cpp ; run grid_graph_example.cpp ;
run grid_graph_properties.cpp ; run grid_graph_properties.cpp ;
exe hawick_circuits : hawick_circuits.cpp ; exe hawick_circuits : hawick_circuits.cpp ;
@ -114,7 +119,7 @@ exe mean_geodesic : mean_geodesic.cpp ;
exe minimum_degree_ordering : minimum_degree_ordering.cpp ; exe minimum_degree_ordering : minimum_degree_ordering.cpp ;
run modify_graph.cpp ; run modify_graph.cpp ;
run neighbor_bfs.cpp ; run neighbor_bfs.cpp ;
run ospf-example.cpp ../build//boost_graph : $(TEST_DIR)/figs/ospf-graph.dot $(TEST_DIR)/figs/ospf-sptree.dot $(TEST_DIR)/routing-table.dat ; run ospf-example.cpp /boost/graph//boost_graph : $(TEST_DIR)/figs/ospf-graph.dot $(TEST_DIR)/figs/ospf-sptree.dot $(TEST_DIR)/routing-table.dat ;
run parallel-compile-time.cpp : $(TEST_DIR)/makefile-dependencies.dat $(TEST_DIR)/makefile-target-names.dat $(TEST_DIR)/target-compile-costs.dat ; run parallel-compile-time.cpp : $(TEST_DIR)/makefile-dependencies.dat $(TEST_DIR)/makefile-target-names.dat $(TEST_DIR)/target-compile-costs.dat ;
run planar_face_traversal.cpp ; run planar_face_traversal.cpp ;
run prim-example.cpp ; run prim-example.cpp ;
@ -129,7 +134,7 @@ run put-get-helper-eg.cpp ;
run quick_tour.cpp ; run quick_tour.cpp ;
run quick-tour.cpp ; run quick-tour.cpp ;
run r_c_shortest_paths_example.cpp ; run r_c_shortest_paths_example.cpp ;
run read_graphviz.cpp ../build//boost_graph ; run read_graphviz.cpp /boost/graph//boost_graph ;
exe read_write_dimacs : read_write_dimacs-eg.cpp ; exe read_write_dimacs : read_write_dimacs-eg.cpp ;
run remove_edge_if_bidir.cpp ; run remove_edge_if_bidir.cpp ;
run remove_edge_if_dir.cpp ; run remove_edge_if_dir.cpp ;
@ -208,7 +213,7 @@ explicit girth ;
#run edge-connectivity.cpp ; #run edge-connectivity.cpp ;
# #
# These compile, but still use the old graphviz interface and die and runtime: # These compile, but still use the old graphviz interface and die and runtime:
# run strong_components.cpp ../build//boost_graph ; # run strong_components.cpp /boost/graph//boost_graph ;
# #

View File

@ -7,9 +7,12 @@
# Define SGB (stanford graph base top level directory) and # Define SGB (stanford graph base top level directory) and
# LEDA (also top level directory) at the command line of jam using -s # LEDA (also top level directory) at the command line of jam using -s
require-b2 5.0.1 ;
import-search /boost/config/checks ;
import modules ; import modules ;
import path ; import path ;
import ../../config/checks/config : requires ; import config : requires ;
path-constant TEST_DIR : . ; path-constant TEST_DIR : . ;
@ -21,6 +24,8 @@ path-constant METIS_INPUT_FILE : ./weighted_graph.gr ;
path-constant WEIGHTED_MATCHING_INPUT_FILE : ./weighted_matching.dat ; path-constant WEIGHTED_MATCHING_INPUT_FILE : ./weighted_matching.dat ;
project : requirements <library>/boost/graph//boost_graph ;
alias graph_test_regular : alias graph_test_regular :
# test_graphs will eventually defined a framework for testing the structure # test_graphs will eventually defined a framework for testing the structure
# and implementation of graph data structures and adaptors. # and implementation of graph data structures and adaptors.
@ -75,13 +80,13 @@ alias graph_test_regular :
[ run graph.cpp : : : <define>TEST=9 : graph_9 ] [ run graph.cpp : : : <define>TEST=9 : graph_9 ]
[ compile graph_concepts.cpp ] [ compile graph_concepts.cpp ]
[ run graphviz_test.cpp [ run graphviz_test.cpp
../build//boost_graph : --log_level=all ] /boost/graph//boost_graph : --log_level=all ]
[ run metis_test.cpp : $(METIS_INPUT_FILE) ] [ run metis_test.cpp : $(METIS_INPUT_FILE) ]
[ run gursoy_atun_layout_test.cpp : : : [ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ] ] [ run gursoy_atun_layout_test.cpp : : : [ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ] ]
[ run layout_test.cpp : : : <test-info>always_show_run_output <toolset>intel:<debug-symbols>off [ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ] ] [ run layout_test.cpp : : : <test-info>always_show_run_output <toolset>intel:<debug-symbols>off [ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ] ]
[ run serialize.cpp [ run serialize.cpp
../../serialization/build//boost_serialization /boost/serialization//boost_serialization
: : : ] : : : ]
[ compile reverse_graph_cc.cpp ] [ compile reverse_graph_cc.cpp ]
@ -119,7 +124,7 @@ alias graph_test_regular :
[ run weighted_matching_test2.cpp ] [ run weighted_matching_test2.cpp ]
[ run max_flow_test.cpp ] [ run max_flow_test.cpp ]
[ run boykov_kolmogorov_max_flow_test.cpp ] [ run boykov_kolmogorov_max_flow_test.cpp ]
[ run cycle_ratio_tests.cpp ../build//boost_graph : $(CYCLE_RATIO_INPUT_FILE) ] [ run cycle_ratio_tests.cpp /boost/graph//boost_graph : $(CYCLE_RATIO_INPUT_FILE) ]
[ run basic_planarity_test.cpp ] [ run basic_planarity_test.cpp ]
[ run make_connected_test.cpp ] [ run make_connected_test.cpp ]
[ run make_bicon_planar_test.cpp ] [ run make_bicon_planar_test.cpp ]
@ -140,14 +145,14 @@ alias graph_test_regular :
[ run clustering_coefficient.cpp ] [ run clustering_coefficient.cpp ]
[ run core_numbers_test.cpp ] [ run core_numbers_test.cpp ]
[ run read_propmap.cpp ] [ run read_propmap.cpp ]
[ run mcgregor_subgraphs_test.cpp ../build//boost_graph ] [ run mcgregor_subgraphs_test.cpp /boost/graph//boost_graph ]
[ compile grid_graph_cc.cpp ] [ compile grid_graph_cc.cpp ]
[ run grid_graph_test.cpp ] [ run grid_graph_test.cpp ]
[ run incremental_components_test.cpp ] [ run incremental_components_test.cpp ]
[ run two_graphs_common_spanning_trees_test.cpp ] [ run two_graphs_common_spanning_trees_test.cpp ]
[ run random_spanning_tree_test.cpp ../build//boost_graph ] [ run random_spanning_tree_test.cpp /boost/graph//boost_graph ]
[ run random_matching_test.cpp : 1000 1020 ] [ run random_matching_test.cpp : 1000 1020 ]
[ run graphml_test.cpp ../build//boost_graph : : "graphml_test.xml" ] [ run graphml_test.cpp /boost/graph//boost_graph : : "graphml_test.xml" ]
[ run mas_test.cpp : $(TEST_DIR) ] [ run mas_test.cpp : $(TEST_DIR) ]
[ run stoer_wagner_test.cpp : $(TEST_DIR) ] [ run stoer_wagner_test.cpp : $(TEST_DIR) ]
[ compile filtered_graph_properties_dijkstra.cpp ] [ compile filtered_graph_properties_dijkstra.cpp ]
@ -173,12 +178,12 @@ alias graph_test_with_filesystem : :
alias graph_test_with_filesystem : alias graph_test_with_filesystem :
[ run all_planar_input_files_test.cpp [ run all_planar_input_files_test.cpp
../../filesystem/build /boost/filesystem//boost_filesystem
../../system/build /boost/system//boost_system
: $(PLANAR_INPUT_FILES) ] : $(PLANAR_INPUT_FILES) ]
[ run parallel_edges_loops_test.cpp [ run parallel_edges_loops_test.cpp
../../filesystem/build /boost/filesystem//boost_filesystem
../../system/build /boost/system//boost_system
: $(PLANAR_INPUT_FILES) ] : $(PLANAR_INPUT_FILES) ]
; ;