mirror of
https://github.com/boostorg/pfr.git
synced 2026-01-19 04:22:13 +00:00
Add support for modular build structure. (#174)
This commit is contained in:
committed by
GitHub
parent
60391652fa
commit
e1e908e804
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -78,19 +78,19 @@ jobs:
|
|||||||
cd ..
|
cd ..
|
||||||
git clone -b $BOOST_BRANCH --depth 10 https://github.com/boostorg/boost.git boost-root
|
git clone -b $BOOST_BRANCH --depth 10 https://github.com/boostorg/boost.git boost-root
|
||||||
cd boost-root
|
cd boost-root
|
||||||
git submodule update --init --depth 10 --jobs 2 tools/boostdep tools/inspect libs/filesystem
|
git submodule update --init --depth 10 --jobs 2 tools/boostdep libs/filesystem tools/inspect
|
||||||
python tools/boostdep/depinst/depinst.py --git_args "--depth 10 --jobs 3" filesystem
|
python tools/boostdep/depinst/depinst.py --git_args "--depth 10 --jobs 3" filesystem
|
||||||
rm -rf libs/$LIBRARY/*
|
rm -rf libs/$LIBRARY/*
|
||||||
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
|
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
|
||||||
python tools/boostdep/depinst/depinst.py --include benchmark --include example --include examples --include tools --git_args "--depth 10 --jobs 3" $LIBRARY
|
python tools/boostdep/depinst/depinst.py --include benchmark --include example --include examples --include tools --git_args "--depth 10 --jobs 3" $LIBRARY
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
./b2 -d0 headers
|
./b2 -d0 headers
|
||||||
./b2 -j4 variant=debug tools/inspect/build
|
./b2 variant=debug tools/inspect/build
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
cd ../boost-root
|
cd ../boost-root
|
||||||
./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release "${{matrix.cxxflags}}" "${{matrix.linkflags}}" "${{matrix.launcher}}"
|
./b2 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release "${{matrix.cxxflags}}" "${{matrix.linkflags}}" "${{matrix.launcher}}"
|
||||||
dist/bin/inspect libs/$LIBRARY
|
dist/bin/inspect libs/$LIBRARY
|
||||||
|
|
||||||
- name: Test boost namespace stripping
|
- name: Test boost namespace stripping
|
||||||
@@ -172,7 +172,7 @@ jobs:
|
|||||||
git clone -b %BOOST_BRANCH% --depth 10 https://github.com/boostorg/boost.git boost-root
|
git clone -b %BOOST_BRANCH% --depth 10 https://github.com/boostorg/boost.git boost-root
|
||||||
cd boost-root
|
cd boost-root
|
||||||
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
|
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
|
||||||
git submodule update --init tools/boostdep
|
git submodule update --init --depth 10 --jobs 2 tools/boostdep
|
||||||
python tools/boostdep/depinst/depinst.py --include benchmark --include example --include examples --include tools --git_args "--jobs 3" %LIBRARY%
|
python tools/boostdep/depinst/depinst.py --include benchmark --include example --include examples --include tools --git_args "--jobs 3" %LIBRARY%
|
||||||
cmd /c bootstrap
|
cmd /c bootstrap
|
||||||
b2 -d0 headers
|
b2 -d0 headers
|
||||||
|
|||||||
20
build.jam
Normal file
20
build.jam
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# 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 ;
|
||||||
|
|
||||||
|
project /boost/pfr
|
||||||
|
: common-requirements
|
||||||
|
<include>include
|
||||||
|
;
|
||||||
|
|
||||||
|
explicit
|
||||||
|
[ alias boost_pfr : : : : <library>$(boost_dependencies) ]
|
||||||
|
[ alias all : boost_pfr test ]
|
||||||
|
;
|
||||||
|
|
||||||
|
call-if : boost-library pfr
|
||||||
|
;
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ project pfr/doc ;
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Common params for doxygen
|
# Common params for doxygen
|
||||||
#
|
#
|
||||||
|
|
||||||
local doxygen_params =
|
local doxygen_params =
|
||||||
<doxygen:param>EXTRACT_ALL=NO
|
<doxygen:param>EXTRACT_ALL=NO
|
||||||
@@ -43,8 +43,8 @@ local doxygen_params =
|
|||||||
|
|
||||||
doxygen autodoc_pfr
|
doxygen autodoc_pfr
|
||||||
:
|
:
|
||||||
[ glob ../../../boost/pfr.hpp ]
|
[ glob ../include/boost/pfr.hpp ]
|
||||||
[ glob ../../../boost/pfr/*.hpp ]
|
[ glob ../include/boost/pfr/*.hpp ]
|
||||||
:
|
:
|
||||||
$(doxygen_params)
|
$(doxygen_params)
|
||||||
<xsl:param>"boost.doxygen.reftitle=Reference Section of PFR"
|
<xsl:param>"boost.doxygen.reftitle=Reference Section of PFR"
|
||||||
|
|||||||
@@ -5,13 +5,17 @@
|
|||||||
# http://www.boost.org/LICENSE_1_0.txt)
|
# http://www.boost.org/LICENSE_1_0.txt)
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import-search /boost/config/checks ;
|
||||||
|
|
||||||
import python ;
|
import python ;
|
||||||
import testing ;
|
import testing ;
|
||||||
import ../../config/checks/config : requires ;
|
import config : requires ;
|
||||||
|
|
||||||
project
|
project
|
||||||
: source-location .
|
: source-location .
|
||||||
: requirements
|
: requirements
|
||||||
|
<library>/boost/config//boost_config
|
||||||
|
<library>/boost/preprocessor//boost_preprocessor
|
||||||
<define>BOOST_PFR_DETAIL_STRICT_RVALUE_TESTING=1
|
<define>BOOST_PFR_DETAIL_STRICT_RVALUE_TESTING=1
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -5,13 +5,20 @@
|
|||||||
# http://www.boost.org/LICENSE_1_0.txt)
|
# http://www.boost.org/LICENSE_1_0.txt)
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import-search /boost/config/checks ;
|
||||||
|
|
||||||
import python ;
|
import python ;
|
||||||
import testing ;
|
import testing ;
|
||||||
import ../../config/checks/config : requires ;
|
import config : requires ;
|
||||||
|
|
||||||
project
|
project
|
||||||
: source-location .
|
: source-location .
|
||||||
: requirements
|
: requirements
|
||||||
|
<library>/boost/config//boost_config
|
||||||
|
<library>/boost/core//boost_core
|
||||||
|
<library>/boost/container_hash//boost_container_hash
|
||||||
|
<library>/boost/type_index//boost_type_index
|
||||||
|
|
||||||
<define>BOOST_PFR_DETAIL_STRICT_RVALUE_TESTING=1
|
<define>BOOST_PFR_DETAIL_STRICT_RVALUE_TESTING=1
|
||||||
[ requires cxx14_constexpr ]
|
[ requires cxx14_constexpr ]
|
||||||
;
|
;
|
||||||
@@ -73,7 +80,7 @@ local BLACKLIST_TESTS_FOR_LOOPHOLE =
|
|||||||
tie_anonymous_const_field # boost::pfr::structure_tie gives compile time error on const fields
|
tie_anonymous_const_field # boost::pfr::structure_tie gives compile time error on const fields
|
||||||
;
|
;
|
||||||
|
|
||||||
# Those tests are either
|
# Those tests are either
|
||||||
# * reflecting a non literal type
|
# * reflecting a non literal type
|
||||||
# * or calling boost::pfr::get and the result is a user defined structure
|
# * or calling boost::pfr::get and the result is a user defined structure
|
||||||
local BLACKLIST_TESTS_FOR_CLASSIC =
|
local BLACKLIST_TESTS_FOR_CLASSIC =
|
||||||
@@ -99,7 +106,7 @@ for local source_file in [ glob ./run/*.cpp ] [ glob ../../example/*.cpp ]
|
|||||||
{
|
{
|
||||||
local target_name = $(source_file[1]:B) ;
|
local target_name = $(source_file[1]:B) ;
|
||||||
pfr_tests += [ run $(source_file) : : : $(STRUCTURED_BINDING_ENGINE) : $(target_name)_sb ] ;
|
pfr_tests += [ run $(source_file) : : : $(STRUCTURED_BINDING_ENGINE) : $(target_name)_sb ] ;
|
||||||
|
|
||||||
if ! $(target_name) in $(BLACKLIST_TESTS_FOR_LOOPHOLE)
|
if ! $(target_name) in $(BLACKLIST_TESTS_FOR_LOOPHOLE)
|
||||||
{
|
{
|
||||||
pfr_tests += [ run $(source_file) : : : $(LOOPHOLE_ENGINE) : $(target_name)_lh ] ;
|
pfr_tests += [ run $(source_file) : : : $(LOOPHOLE_ENGINE) : $(target_name)_lh ] ;
|
||||||
|
|||||||
@@ -8,8 +8,10 @@
|
|||||||
# The way to make it union and UB free by X-Ryl669, https://github.com/X-Ryl669
|
# The way to make it union and UB free by X-Ryl669, https://github.com/X-Ryl669
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import-search /boost/config/checks ;
|
||||||
|
|
||||||
import testing ;
|
import testing ;
|
||||||
import ../../config/checks/config : requires ;
|
import config : requires ;
|
||||||
|
|
||||||
########## BEGIN of helpers to detect C++20 features support
|
########## BEGIN of helpers to detect C++20 features support
|
||||||
|
|
||||||
@@ -38,6 +40,7 @@ explicit compiler_supports_cxx20_nontype_tplarg ;
|
|||||||
project
|
project
|
||||||
: source-location .
|
: source-location .
|
||||||
: requirements
|
: requirements
|
||||||
|
<library>/boost/core//boost_core
|
||||||
<define>BOOST_PFR_DETAIL_STRICT_RVALUE_TESTING=1
|
<define>BOOST_PFR_DETAIL_STRICT_RVALUE_TESTING=1
|
||||||
[ check-target-builds ../core_name//compiler_supports_cxx20_address_of_non_static_member_tplarg : : [ check-target-builds ../core_name//compiler_supports_cxx20_nontype_tplarg : : <build>no ] ]
|
[ check-target-builds ../core_name//compiler_supports_cxx20_address_of_non_static_member_tplarg : : [ check-target-builds ../core_name//compiler_supports_cxx20_nontype_tplarg : : <build>no ] ]
|
||||||
;
|
;
|
||||||
|
|||||||
Reference in New Issue
Block a user