mirror of
https://github.com/boostorg/circular_buffer.git
synced 2026-02-05 09:42:12 +00:00
Compare commits
27 Commits
boost-1.80
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d8bebb761 | ||
|
|
f431f5ad94 | ||
|
|
895039f821 | ||
|
|
fcabdd5f9e | ||
|
|
7bdc2a1d70 | ||
|
|
d58d2dcde8 | ||
|
|
0cbdd5b7fe | ||
|
|
b18cb837b4 | ||
|
|
ad5dd6960a | ||
|
|
79833d3fea | ||
|
|
737acf58a2 | ||
|
|
243f4a4b54 | ||
|
|
0320ba365c | ||
|
|
c7f6164f32 | ||
|
|
36ac5b3a29 | ||
|
|
c456d21adb | ||
|
|
bbbdf89031 | ||
|
|
02ec070792 | ||
|
|
0d8027e607 | ||
|
|
d2f6eff9bd | ||
|
|
7f7d13fffb | ||
|
|
c0ed5c34b6 | ||
|
|
2959b67a60 | ||
|
|
a08a5b55ee | ||
|
|
05a83223e4 | ||
|
|
6c5ebd98a0 | ||
|
|
d99ba9ae43 |
668
.github/workflows/ci.yml
vendored
Normal file
668
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,668 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
- feature/**
|
||||||
|
|
||||||
|
env:
|
||||||
|
UBSAN_OPTIONS: print_stacktrace=1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
posix:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- toolset: gcc-4.8
|
||||||
|
cxxstd: "03,11"
|
||||||
|
container: ubuntu:18.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-4.8-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-4.9
|
||||||
|
cxxstd: "03,11"
|
||||||
|
container: ubuntu:16.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-4.9-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-5
|
||||||
|
cxxstd: "03,11,14,1z"
|
||||||
|
container: ubuntu:18.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-5-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-6
|
||||||
|
cxxstd: "03,11,14,1z"
|
||||||
|
container: ubuntu:18.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-6-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-7
|
||||||
|
cxxstd: "03,11,14,17"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-7-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-8
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-8-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-9
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-9-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-10
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
container: ubuntu:22.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-10-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-11
|
||||||
|
cxxstd: "03,11,14,17,20"
|
||||||
|
container: ubuntu:22.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-11-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-12
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:22.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-12-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-13
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:24.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-13-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-14
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:24.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-14-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-15
|
||||||
|
cxxstd: "03,11,14,17,20,23,2c"
|
||||||
|
container: ubuntu:25.10
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-15-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-3.9
|
||||||
|
cxxstd: "03,11,14"
|
||||||
|
container: ubuntu:18.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-3.9
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-4.0
|
||||||
|
cxxstd: "03,11,14"
|
||||||
|
container: ubuntu:18.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-4.0
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-5.0
|
||||||
|
cxxstd: "03,11,14,1z"
|
||||||
|
container: ubuntu:18.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-5.0
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-6.0
|
||||||
|
cxxstd: "03,11,14,17"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-6.0
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-7
|
||||||
|
cxxstd: "03,11,14,17"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-7
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-8
|
||||||
|
cxxstd: "03,11,14,17"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-8
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-9
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-9
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-10
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-10
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-11
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-11
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-12
|
||||||
|
cxxstd: "03,11,14,17,20"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-12
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-13
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:22.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-13
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-14
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:22.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-14
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-15
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:22.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-15
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-16
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:24.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-16
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-17
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:24.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-17
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-18
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:24.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-18
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-19
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:24.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-19
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-20
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:24.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-20
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-21
|
||||||
|
cxxstd: "03,11,14,17,20,23,2c"
|
||||||
|
container: ubuntu:25.10
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-21
|
||||||
|
- toolset: clang
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
os: macos-14
|
||||||
|
- toolset: clang
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
os: macos-15
|
||||||
|
- toolset: clang
|
||||||
|
cxxstd: "03,11,14,17,20,23,2c"
|
||||||
|
os: macos-26
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: ${{matrix.container}}
|
||||||
|
volumes:
|
||||||
|
- /node20217:/node20217:rw,rshared
|
||||||
|
- ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Setup container environment
|
||||||
|
if: matrix.container
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get -y install sudo python3 git g++ curl xz-utils
|
||||||
|
|
||||||
|
- name: Install nodejs20glibc2.17
|
||||||
|
if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }}
|
||||||
|
run: |
|
||||||
|
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
|
||||||
|
ldd /__e/node20/bin/node
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
if: matrix.install
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get -y install ${{matrix.install}}
|
||||||
|
|
||||||
|
- name: Setup Boost
|
||||||
|
run: |
|
||||||
|
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
|
||||||
|
LIBRARY=${GITHUB_REPOSITORY#*/}
|
||||||
|
echo LIBRARY: $LIBRARY
|
||||||
|
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
|
||||||
|
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
|
||||||
|
echo GITHUB_REF: $GITHUB_REF
|
||||||
|
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
|
||||||
|
REF=${REF#refs/heads/}
|
||||||
|
echo REF: $REF
|
||||||
|
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
|
||||||
|
echo BOOST_BRANCH: $BOOST_BRANCH
|
||||||
|
cd ..
|
||||||
|
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
cd boost-root
|
||||||
|
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
|
||||||
|
git submodule update --init tools/boostdep
|
||||||
|
python3 tools/boostdep/depinst/depinst.py -I examples $LIBRARY
|
||||||
|
./bootstrap.sh
|
||||||
|
./b2 -d0 headers
|
||||||
|
|
||||||
|
- name: Create user-config.jam
|
||||||
|
if: matrix.compiler
|
||||||
|
run: |
|
||||||
|
echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
cd ../boost-root
|
||||||
|
export ADDRMD=${{matrix.address-model}}
|
||||||
|
./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} ${ADDRMD:+address-model=$ADDRMD} variant=debug,release
|
||||||
|
|
||||||
|
windows:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- toolset: msvc-14.3
|
||||||
|
cxxstd: "14,17,20,latest"
|
||||||
|
addrmd: 32,64
|
||||||
|
os: windows-2022
|
||||||
|
- toolset: clang-win
|
||||||
|
cxxstd: "14,17,20,latest"
|
||||||
|
addrmd: 32,64
|
||||||
|
os: windows-2025
|
||||||
|
- toolset: gcc
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
addrmd: 64
|
||||||
|
os: windows-2022
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Boost
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
|
||||||
|
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
|
||||||
|
echo LIBRARY: %LIBRARY%
|
||||||
|
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
|
||||||
|
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
|
||||||
|
echo GITHUB_REF: %GITHUB_REF%
|
||||||
|
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
|
||||||
|
set BOOST_BRANCH=develop
|
||||||
|
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
|
||||||
|
echo BOOST_BRANCH: %BOOST_BRANCH%
|
||||||
|
cd ..
|
||||||
|
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
cd boost-root
|
||||||
|
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
|
||||||
|
git submodule update --init tools/boostdep
|
||||||
|
python tools/boostdep/depinst/depinst.py -I examples --git_args "--jobs 3" %LIBRARY%
|
||||||
|
cmd /c bootstrap
|
||||||
|
b2 -d0 headers
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root
|
||||||
|
b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker
|
||||||
|
|
||||||
|
posix-cmake-subdir:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
- os: macos-latest
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
if: matrix.install
|
||||||
|
run: sudo apt-get -y install ${{matrix.install}}
|
||||||
|
|
||||||
|
- name: Setup Boost
|
||||||
|
run: |
|
||||||
|
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
|
||||||
|
LIBRARY=${GITHUB_REPOSITORY#*/}
|
||||||
|
echo LIBRARY: $LIBRARY
|
||||||
|
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
|
||||||
|
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
|
||||||
|
echo GITHUB_REF: $GITHUB_REF
|
||||||
|
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
|
||||||
|
REF=${REF#refs/heads/}
|
||||||
|
echo REF: $REF
|
||||||
|
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
|
||||||
|
echo BOOST_BRANCH: $BOOST_BRANCH
|
||||||
|
cd ..
|
||||||
|
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
cd boost-root
|
||||||
|
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
|
||||||
|
git submodule update --init tools/boostdep
|
||||||
|
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
|
||||||
|
|
||||||
|
- name: Use library with add_subdirectory
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test
|
||||||
|
mkdir __build__ && cd __build__
|
||||||
|
cmake ..
|
||||||
|
cmake --build .
|
||||||
|
ctest --output-on-failure --no-tests=error
|
||||||
|
|
||||||
|
posix-cmake-install:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
- os: macos-latest
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
if: matrix.install
|
||||||
|
run: sudo apt-get -y install ${{matrix.install}}
|
||||||
|
|
||||||
|
- name: Setup Boost
|
||||||
|
run: |
|
||||||
|
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
|
||||||
|
LIBRARY=${GITHUB_REPOSITORY#*/}
|
||||||
|
echo LIBRARY: $LIBRARY
|
||||||
|
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
|
||||||
|
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
|
||||||
|
echo GITHUB_REF: $GITHUB_REF
|
||||||
|
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
|
||||||
|
REF=${REF#refs/heads/}
|
||||||
|
echo REF: $REF
|
||||||
|
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
|
||||||
|
echo BOOST_BRANCH: $BOOST_BRANCH
|
||||||
|
cd ..
|
||||||
|
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
cd boost-root
|
||||||
|
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
|
||||||
|
git submodule update --init tools/boostdep
|
||||||
|
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
|
||||||
|
|
||||||
|
- name: Configure
|
||||||
|
run: |
|
||||||
|
cd ../boost-root
|
||||||
|
mkdir __build__ && cd __build__
|
||||||
|
cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local ..
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
cmake --build . --target install
|
||||||
|
|
||||||
|
- name: Use the installed library
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX=~/.local ..
|
||||||
|
cmake --build .
|
||||||
|
ctest --output-on-failure --no-tests=error
|
||||||
|
|
||||||
|
posix-cmake-test:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
- os: macos-latest
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
if: matrix.install
|
||||||
|
run: sudo apt-get -y install ${{matrix.install}}
|
||||||
|
|
||||||
|
- name: Setup Boost
|
||||||
|
run: |
|
||||||
|
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
|
||||||
|
LIBRARY=${GITHUB_REPOSITORY#*/}
|
||||||
|
echo LIBRARY: $LIBRARY
|
||||||
|
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
|
||||||
|
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
|
||||||
|
echo GITHUB_REF: $GITHUB_REF
|
||||||
|
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
|
||||||
|
REF=${REF#refs/heads/}
|
||||||
|
echo REF: $REF
|
||||||
|
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
|
||||||
|
echo BOOST_BRANCH: $BOOST_BRANCH
|
||||||
|
cd ..
|
||||||
|
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
cd boost-root
|
||||||
|
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
|
||||||
|
git submodule update --init tools/boostdep
|
||||||
|
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
|
||||||
|
|
||||||
|
- name: Configure
|
||||||
|
run: |
|
||||||
|
cd ../boost-root
|
||||||
|
mkdir __build__ && cd __build__
|
||||||
|
cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON ..
|
||||||
|
|
||||||
|
- name: Build tests
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
cmake --build . --target tests
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
ctest --output-on-failure --no-tests=error
|
||||||
|
|
||||||
|
windows-cmake-subdir:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: windows-latest
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Boost
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
|
||||||
|
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
|
||||||
|
echo LIBRARY: %LIBRARY%
|
||||||
|
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
|
||||||
|
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
|
||||||
|
echo GITHUB_REF: %GITHUB_REF%
|
||||||
|
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
|
||||||
|
set BOOST_BRANCH=develop
|
||||||
|
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
|
||||||
|
echo BOOST_BRANCH: %BOOST_BRANCH%
|
||||||
|
cd ..
|
||||||
|
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
cd boost-root
|
||||||
|
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
|
||||||
|
git submodule update --init tools/boostdep
|
||||||
|
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
|
||||||
|
|
||||||
|
- name: Use library with add_subdirectory (Debug)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test
|
||||||
|
mkdir __build__ && cd __build__
|
||||||
|
cmake ..
|
||||||
|
cmake --build . --config Debug
|
||||||
|
ctest --output-on-failure --no-tests=error -C Debug
|
||||||
|
|
||||||
|
- name: Use library with add_subdirectory (Release)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test/__build__
|
||||||
|
cmake --build . --config Release
|
||||||
|
ctest --output-on-failure --no-tests=error -C Release
|
||||||
|
|
||||||
|
windows-cmake-install:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: windows-latest
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Boost
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
|
||||||
|
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
|
||||||
|
echo LIBRARY: %LIBRARY%
|
||||||
|
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
|
||||||
|
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
|
||||||
|
echo GITHUB_REF: %GITHUB_REF%
|
||||||
|
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
|
||||||
|
set BOOST_BRANCH=develop
|
||||||
|
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
|
||||||
|
echo BOOST_BRANCH: %BOOST_BRANCH%
|
||||||
|
cd ..
|
||||||
|
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
cd boost-root
|
||||||
|
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
|
||||||
|
git submodule update --init tools/boostdep
|
||||||
|
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
|
||||||
|
|
||||||
|
- name: Configure
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root
|
||||||
|
mkdir __build__ && cd __build__
|
||||||
|
cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix ..
|
||||||
|
|
||||||
|
- name: Install (Debug)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
cmake --build . --target install --config Debug
|
||||||
|
|
||||||
|
- name: Install (Release)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
cmake --build . --target install --config Release
|
||||||
|
|
||||||
|
- name: Use the installed library (Debug)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix ..
|
||||||
|
cmake --build . --config Debug
|
||||||
|
ctest --output-on-failure --no-tests=error -C Debug
|
||||||
|
|
||||||
|
- name: Use the installed library (Release)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test/__build__
|
||||||
|
cmake --build . --config Release
|
||||||
|
ctest --output-on-failure --no-tests=error -C Release
|
||||||
|
|
||||||
|
windows-cmake-test:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: windows-latest
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Boost
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
|
||||||
|
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
|
||||||
|
echo LIBRARY: %LIBRARY%
|
||||||
|
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
|
||||||
|
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
|
||||||
|
echo GITHUB_REF: %GITHUB_REF%
|
||||||
|
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
|
||||||
|
set BOOST_BRANCH=develop
|
||||||
|
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
|
||||||
|
echo BOOST_BRANCH: %BOOST_BRANCH%
|
||||||
|
cd ..
|
||||||
|
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
cd boost-root
|
||||||
|
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
|
||||||
|
git submodule update --init tools/boostdep
|
||||||
|
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
|
||||||
|
|
||||||
|
- name: Configure
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root
|
||||||
|
mkdir __build__ && cd __build__
|
||||||
|
cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON ..
|
||||||
|
|
||||||
|
- name: Build tests (Debug)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
cmake --build . --target tests --config Debug
|
||||||
|
|
||||||
|
- name: Run tests (Debug)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
ctest --output-on-failure --no-tests=error -C Debug
|
||||||
|
|
||||||
|
- name: Build tests (Release)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
cmake --build . --target tests --config Release
|
||||||
|
|
||||||
|
- name: Run tests (Release)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
ctest --output-on-failure --no-tests=error -C Release
|
||||||
@@ -1,26 +1,30 @@
|
|||||||
# Copyright 2018 Glen Joseph Fernandes
|
# Generated by `boostdep --cmake circular_buffer`
|
||||||
# (glenjofe@gmail.com)
|
# Copyright 2020, 2021 Peter Dimov
|
||||||
#
|
|
||||||
# Distributed under the Boost Software License, Version 1.0.
|
# Distributed under the Boost Software License, Version 1.0.
|
||||||
# (http://www.boost.org/LICENSE_1_0.txt)
|
# https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.5...3.20)
|
cmake_minimum_required(VERSION 3.8...3.31)
|
||||||
|
|
||||||
project(boost_circular_buffer VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
project(boost_circular_buffer VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||||
|
|
||||||
add_library(boost_circular_buffer INTERFACE)
|
add_library(boost_circular_buffer INTERFACE)
|
||||||
|
|
||||||
add_library(Boost::circular_buffer ALIAS boost_circular_buffer)
|
add_library(Boost::circular_buffer ALIAS boost_circular_buffer)
|
||||||
|
|
||||||
target_include_directories(boost_circular_buffer INTERFACE include)
|
target_include_directories(boost_circular_buffer INTERFACE include)
|
||||||
|
|
||||||
target_link_libraries(boost_circular_buffer INTERFACE
|
target_link_libraries(boost_circular_buffer
|
||||||
|
INTERFACE
|
||||||
Boost::assert
|
Boost::assert
|
||||||
Boost::concept_check
|
Boost::concept_check
|
||||||
Boost::config
|
Boost::config
|
||||||
Boost::core
|
Boost::core
|
||||||
Boost::move
|
Boost::move
|
||||||
Boost::static_assert
|
|
||||||
Boost::throw_exception
|
Boost::throw_exception
|
||||||
Boost::type_traits
|
Boost::type_traits
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
|
||||||
|
|
||||||
|
add_subdirectory(test)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|||||||
30
build.jam
Normal file
30
build.jam
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# 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/assert//boost_assert
|
||||||
|
/boost/concept_check//boost_concept_check
|
||||||
|
/boost/config//boost_config
|
||||||
|
/boost/core//boost_core
|
||||||
|
/boost/move//boost_move
|
||||||
|
/boost/throw_exception//boost_throw_exception
|
||||||
|
/boost/type_traits//boost_type_traits ;
|
||||||
|
|
||||||
|
project /boost/circular_buffer
|
||||||
|
: common-requirements
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
explicit
|
||||||
|
[ alias boost_circular_buffer : : :
|
||||||
|
: <include>include <library>$(boost_dependencies) ]
|
||||||
|
[ alias all : boost_circular_buffer example test ]
|
||||||
|
;
|
||||||
|
|
||||||
|
call-if : boost-library circular_buffer
|
||||||
|
;
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
# Use, modification and distribution is subject to
|
# Use, modification and distribution is subject to
|
||||||
# the Boost Software License, Version 1.0.
|
# the Boost Software License, Version 1.0.
|
||||||
# (See accompanying file LICENSE_1_0.txt
|
# (See accompanying file LICENSE_1_0.txt
|
||||||
# or copy at http://www.boost.org/LICENSE_1_0.txt)
|
# or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
path-constant nav_images : html/images/ ; # png and svg images for home, next, note, tip...
|
path-constant nav_images : html/images/ ; # png and svg images for home, next, note, tip...
|
||||||
@@ -16,7 +16,7 @@ path-constant here : . ; # location of /doc folder.
|
|||||||
|
|
||||||
# echo "nav_images = " $(nav_images) ; # "nav_images = I:\boost-trunk\libs\circular_buffer\doc\html\images
|
# echo "nav_images = " $(nav_images) ; # "nav_images = I:\boost-trunk\libs\circular_buffer\doc\html\images
|
||||||
# echo "images_location = " $(images_location) ; # images_location = I:\boost-trunk\libs\circular_buffer\doc\html\images
|
# echo "images_location = " $(images_location) ; # images_location = I:\boost-trunk\libs\circular_buffer\doc\html\images
|
||||||
# echo "pdf_images_location = " $(pdf_images_location) #
|
# echo "pdf_images_location = " $(pdf_images_location) #
|
||||||
import modules ;
|
import modules ;
|
||||||
using auto-index ;
|
using auto-index ;
|
||||||
using doxygen ; # Required if you want to use Doxygen.
|
using doxygen ; # Required if you want to use Doxygen.
|
||||||
@@ -26,10 +26,10 @@ using quickbook ;
|
|||||||
doxygen autodoc
|
doxygen autodoc
|
||||||
:
|
:
|
||||||
# List all the files individually (RECURSIVE=NO ).
|
# List all the files individually (RECURSIVE=NO ).
|
||||||
[ glob ../../../boost/circular_buffer.hpp ]
|
[ glob ../include/boost/circular_buffer.hpp ]
|
||||||
[ glob ../../../boost/circular_buffer/base.hpp ]
|
[ glob ../include/boost/circular_buffer/base.hpp ]
|
||||||
[ glob ../../../boost/circular_buffer/space_optimized.hpp ]
|
[ glob ../include/boost/circular_buffer/space_optimized.hpp ]
|
||||||
|
|
||||||
:
|
:
|
||||||
# Pass some setting parameters to Doxygen.
|
# Pass some setting parameters to Doxygen.
|
||||||
<doxygen:param>WARNINGS=YES # Default NO, but useful to see warnings, especially in a logfile.
|
<doxygen:param>WARNINGS=YES # Default NO, but useful to see warnings, especially in a logfile.
|
||||||
@@ -38,14 +38,14 @@ doxygen autodoc
|
|||||||
# Much better to send message to a logfile than the default stderr.
|
# Much better to send message to a logfile than the default stderr.
|
||||||
# and make sure that there are no Doxygen errors or significant warnings in the log file.
|
# and make sure that there are no Doxygen errors or significant warnings in the log file.
|
||||||
<doxygen:param>RECURSIVE=NO # Search recursively down .hpp and .cpp subdirectories.
|
<doxygen:param>RECURSIVE=NO # Search recursively down .hpp and .cpp subdirectories.
|
||||||
<doxygen:param>EXTRACT_ALL=NO
|
<doxygen:param>EXTRACT_ALL=NO
|
||||||
<doxygen:param>EXTRACT_PRIVATE=NO # NO means do not extract info about private member functions and data.
|
<doxygen:param>EXTRACT_PRIVATE=NO # NO means do not extract info about private member functions and data.
|
||||||
<doxygen:param>HIDE_UNDOC_MEMBERS=YES # Only show members that have some documentation like \param, \return ...
|
<doxygen:param>HIDE_UNDOC_MEMBERS=YES # Only show members that have some documentation like \param, \return ...
|
||||||
<doxygen:param>MACRO_EXPANSION=YES # YES will expand all macro names in the source code (default = NO).
|
<doxygen:param>MACRO_EXPANSION=YES # YES will expand all macro names in the source code (default = NO).
|
||||||
<doxygen:param>EXPAND_ONLY_PREDEF=YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
|
<doxygen:param>EXPAND_ONLY_PREDEF=YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
|
||||||
# then the macro expansion is limited to the macros specified with the PREDEFINED and EXPAND_AS_DEFINED tags.
|
# then the macro expansion is limited to the macros specified with the PREDEFINED and EXPAND_AS_DEFINED tags.
|
||||||
# If EXPAND_ONLY_PREDEF tag can be used to specify a list of macro names that should be expanded (as defined).
|
# If EXPAND_ONLY_PREDEF tag can be used to specify a list of macro names that should be expanded (as defined).
|
||||||
# The PREDEFINED tag can be used to specify one or more macro names that are defined
|
# The PREDEFINED tag can be used to specify one or more macro names that are defined
|
||||||
# before the preprocessor is started (similar to the -D option of gcc).
|
# before the preprocessor is started (similar to the -D option of gcc).
|
||||||
# The argument of the tag is a list of macros of the form:
|
# The argument of the tag is a list of macros of the form:
|
||||||
# name or name=definition (no spaces).
|
# name or name=definition (no spaces).
|
||||||
@@ -78,17 +78,17 @@ doxygen autodoc
|
|||||||
<doxygen:param>EXCLUDE_SYMBOLS=*_throws
|
<doxygen:param>EXCLUDE_SYMBOLS=*_throws
|
||||||
# <doxygen:param>IMAGE_PATH="../images" # for circular_buffer.png
|
# <doxygen:param>IMAGE_PATH="../images" # for circular_buffer.png
|
||||||
# See autodoxywarnings.log to check this is correct.
|
# See autodoxywarnings.log to check this is correct.
|
||||||
|
|
||||||
# The syntax hoops to jump through are 'interesting' for more than one PREDEFINED,
|
# The syntax hoops to jump through are 'interesting' for more than one PREDEFINED,
|
||||||
# and to permit spaces within definitions (use double quotes).
|
# and to permit spaces within definitions (use double quotes).
|
||||||
# Don't forget that every double quote " needs a preceding \trip character!
|
# Don't forget that every double quote " needs a preceding \trip character!
|
||||||
# and that each trailing continuation \ needs a preceding \trip character too!
|
# and that each trailing continuation \ needs a preceding \trip character too!
|
||||||
# And finally that if more than one item is included (as here) the whole is
|
# And finally that if more than one item is included (as here) the whole is
|
||||||
# enclosed in "PREDEFINED=... ", but without a leading \. Go figure...
|
# enclosed in "PREDEFINED=... ", but without a leading \. Go figure...
|
||||||
|
|
||||||
# A grep for PREDEFINED= in jamfiles will reveal even more complex examples.
|
# A grep for PREDEFINED= in jamfiles will reveal even more complex examples.
|
||||||
# Boost Libraries with useful examples are: Accumulators, Interprocess, MPI, Random, Units, Expressive.
|
# Boost Libraries with useful examples are: Accumulators, Interprocess, MPI, Random, Units, Expressive.
|
||||||
|
|
||||||
# Optionally, you can provide a Reference section name specific for your library, for example:
|
# Optionally, you can provide a Reference section name specific for your library, for example:
|
||||||
<xsl:param>"boost.doxygen.reftitle=Boost.Circular_buffer C++ Reference"
|
<xsl:param>"boost.doxygen.reftitle=Boost.Circular_buffer C++ Reference"
|
||||||
;
|
;
|
||||||
@@ -101,7 +101,7 @@ boostbook standalone
|
|||||||
:
|
:
|
||||||
circular_buffer
|
circular_buffer
|
||||||
:
|
:
|
||||||
|
|
||||||
# General settings
|
# General settings
|
||||||
# =================
|
# =================
|
||||||
<format>html:<xsl:param>boost.root=../../../..
|
<format>html:<xsl:param>boost.root=../../../..
|
||||||
@@ -118,7 +118,7 @@ boostbook standalone
|
|||||||
<xsl:param>page.margin.outer=0.5in
|
<xsl:param>page.margin.outer=0.5in
|
||||||
# Yes, we want graphics for admonishments:
|
# Yes, we want graphics for admonishments:
|
||||||
<xsl:param>admon.graphics=1
|
<xsl:param>admon.graphics=1
|
||||||
|
|
||||||
# HTML options:
|
# HTML options:
|
||||||
# =============
|
# =============
|
||||||
# Use graphics icons not text for navigation:
|
# Use graphics icons not text for navigation:
|
||||||
@@ -137,27 +137,27 @@ boostbook standalone
|
|||||||
<format>html:<xsl:param>html.cellspacing=3 # pixels
|
<format>html:<xsl:param>html.cellspacing=3 # pixels
|
||||||
# Vertical spacing in table cells.
|
# Vertical spacing in table cells.
|
||||||
<format>html:<xsl:param>html.cellpadding=5 # pixels
|
<format>html:<xsl:param>html.cellpadding=5 # pixels
|
||||||
# Not sure if these are right way round?
|
# Not sure if these are right way round?
|
||||||
|
|
||||||
<auto-index>on # Turns on index (or off).
|
<auto-index>on # Turns on index (or off).
|
||||||
# Turns on (or off) index-verbose for diagnostic info (using /bin auto-index-verbose folders).
|
# Turns on (or off) index-verbose for diagnostic info (using /bin auto-index-verbose folders).
|
||||||
<auto-index-verbose>on
|
<auto-index-verbose>on
|
||||||
|
|
||||||
<format>pdf:<auto-index-internal>off # on (or off) to use internally generated indexes.
|
<format>pdf:<auto-index-internal>off # on (or off) to use internally generated indexes.
|
||||||
|
|
||||||
<format>html:<xsl:param>index.on.type=1 # = 1 For the native stylesheets to generate multiple different indexes.
|
<format>html:<xsl:param>index.on.type=1 # = 1 For the native stylesheets to generate multiple different indexes.
|
||||||
|
|
||||||
<auto-index-script>circular_buffer.idx # Specifies the name of the script to load for circular_buffer.
|
<auto-index-script>circular_buffer.idx # Specifies the name of the script to load for circular_buffer.
|
||||||
<auto-index-prefix>../../.. # Will get you back up to /circular_buffer, so !scan-path "boost/circular_buffer/" is where *.hpp will be,
|
<auto-index-prefix>../../.. # Will get you back up to /circular_buffer, so !scan-path "boost/circular_buffer/" is where *.hpp will be,
|
||||||
# and /libs/circular_buffer for other files.
|
# and /libs/circular_buffer for other files.
|
||||||
# Without this would need !scan-path "../../../boost/circular_buffer"
|
# Without this would need !scan-path "../../../boost/circular_buffer"
|
||||||
|
|
||||||
# Used by Quickbook to invoke indexing.
|
# Used by Quickbook to invoke indexing.
|
||||||
# Required by boost-trunk/doc/ see jamfile.v2 to use auto-index.
|
# Required by boost-trunk/doc/ see jamfile.v2 to use auto-index.
|
||||||
# Choose indexing method for html:
|
# Choose indexing method for html:
|
||||||
<format>html:<auto-index-internal>on
|
<format>html:<auto-index-internal>on
|
||||||
<format>docbook:<auto-index-internal>on
|
<format>docbook:<auto-index-internal>on
|
||||||
|
|
||||||
# PDF Options:
|
# PDF Options:
|
||||||
# ============
|
# ============
|
||||||
# TOC Generation: this is needed for FOP-0.9 and later:
|
# TOC Generation: this is needed for FOP-0.9 and later:
|
||||||
@@ -172,10 +172,10 @@ boostbook standalone
|
|||||||
<xsl:param>page.margin.inner=0.5in
|
<xsl:param>page.margin.inner=0.5in
|
||||||
# Margin size:
|
# Margin size:
|
||||||
<xsl:param>page.margin.outer=0.5in
|
<xsl:param>page.margin.outer=0.5in
|
||||||
|
|
||||||
# Yes, we want graphics for admonishments:
|
# Yes, we want graphics for admonishments:
|
||||||
<xsl:param>admon.graphics=1
|
<xsl:param>admon.graphics=1
|
||||||
|
|
||||||
# Set these one for PDF generation *only*:
|
# Set these one for PDF generation *only*:
|
||||||
# default png graphics are awful in PDF form,
|
# default png graphics are awful in PDF form,
|
||||||
# better use SVG instead:
|
# better use SVG instead:
|
||||||
@@ -183,19 +183,19 @@ boostbook standalone
|
|||||||
#<format>pdf:<xsl:param>admon.graphics.extension=".png" # Only png images are available.
|
#<format>pdf:<xsl:param>admon.graphics.extension=".png" # Only png images are available.
|
||||||
# Don't need this, default path works OK:
|
# Don't need this, default path works OK:
|
||||||
#<format>pdf:<xsl:param>admon.graphics.path=$(nav_images)/ # next, prev, note, tip ... for pdf.
|
#<format>pdf:<xsl:param>admon.graphics.path=$(nav_images)/ # next, prev, note, tip ... for pdf.
|
||||||
<format>pdf:<xsl:param>use.role.for.mediaobject=1
|
<format>pdf:<xsl:param>use.role.for.mediaobject=1
|
||||||
<format>pdf:<xsl:param>preferred.mediaobject.role=print
|
<format>pdf:<xsl:param>preferred.mediaobject.role=print
|
||||||
<format>pdf:<xsl:param>img.src.path=$(pdf_images_location)/ # graphics (diagrams) for pdf.
|
<format>pdf:<xsl:param>img.src.path=$(pdf_images_location)/ # graphics (diagrams) for pdf.
|
||||||
<format>pdf:<xsl:param>draft.mode="no"
|
<format>pdf:<xsl:param>draft.mode="no"
|
||||||
<format>pdf:<xsl:param>boost.url.prefix=../../../..
|
<format>pdf:<xsl:param>boost.url.prefix=../../../..
|
||||||
|
|
||||||
<dependency>autodoc #
|
<dependency>autodoc #
|
||||||
<dependency>png_install
|
<dependency>png_install
|
||||||
;
|
;
|
||||||
|
|
||||||
# Install (copy) the 'master' copies of all icon images (both PNG and SVG)
|
# Install (copy) the 'master' copies of all icon images (both PNG and SVG)
|
||||||
# and the Boost logo from your current Boost-root
|
# and the Boost logo from your current Boost-root
|
||||||
# to the local /doc/html/images folder so that html is complete and standalone.
|
# to the local /doc/html/images folder so that html is complete and standalone.
|
||||||
install png_install : [ glob $(here)/*.png ] : <location>$(here)/../../../doc/html/images ;
|
install png_install : [ glob $(here)/*.png ] : <location>$(here)/../../../doc/html/images ;
|
||||||
|
|
||||||
# install pdf-install : standalone : <install-type>PDF <location>. ;
|
# install pdf-install : standalone : <install-type>PDF <location>. ;
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ const int UNINITIALIZED = 0xcc;
|
|||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
inline void do_fill_uninitialized_memory(T* data, std::size_t size_in_bytes) BOOST_NOEXCEPT {
|
inline void do_fill_uninitialized_memory(T* data, std::size_t size_in_bytes) BOOST_NOEXCEPT {
|
||||||
|
#if defined(__GNUC__) && __GNUC__ < 5
|
||||||
|
// Avoid warning for calling memset with a constant size of zero
|
||||||
|
if( size_in_bytes )
|
||||||
|
#endif
|
||||||
std::memset(static_cast<void*>(data), UNINITIALIZED, size_in_bytes);
|
std::memset(static_cast<void*>(data), UNINITIALIZED, size_in_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -259,7 +259,10 @@ struct iterator
|
|||||||
#endif // #if BOOST_CB_ENABLE_DEBUG
|
#endif // #if BOOST_CB_ENABLE_DEBUG
|
||||||
|
|
||||||
//! Assign operator.
|
//! Assign operator.
|
||||||
iterator& operator = (const iterator& it) {
|
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
|
||||||
|
iterator& operator=(const iterator&) = default;
|
||||||
|
#else
|
||||||
|
iterator& operator=(const iterator& it) {
|
||||||
if (this == &it)
|
if (this == &it)
|
||||||
return *this;
|
return *this;
|
||||||
#if BOOST_CB_ENABLE_DEBUG
|
#if BOOST_CB_ENABLE_DEBUG
|
||||||
@@ -269,6 +272,7 @@ struct iterator
|
|||||||
m_it = it.m_it;
|
m_it = it.m_it;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Random access iterator methods
|
// Random access iterator methods
|
||||||
|
|
||||||
|
|||||||
11
test/CMakeLists.txt
Normal file
11
test/CMakeLists.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Copyright 2018, 2019 Peter Dimov
|
||||||
|
# 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
|
||||||
|
|
||||||
|
include(BoostTestJamfile OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
|
||||||
|
|
||||||
|
if(HAVE_BOOST_TEST)
|
||||||
|
|
||||||
|
boost_test_jamfile(FILE Jamfile.v2 LINK_LIBRARIES Boost::circular_buffer Boost::core)
|
||||||
|
|
||||||
|
endif()
|
||||||
@@ -13,20 +13,18 @@ import testing ;
|
|||||||
|
|
||||||
project
|
project
|
||||||
: requirements
|
: requirements
|
||||||
|
<library>/boost/circular_buffer//boost_circular_buffer
|
||||||
<toolset>msvc:<warnings>all
|
<toolset>msvc:<warnings>all
|
||||||
<toolset>msvc:<asynch-exceptions>on
|
|
||||||
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
|
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
|
||||||
<toolset>msvc:<cxxflags>/wd4996 # 'function': was declared deprecated
|
<toolset>msvc:<cxxflags>/wd4996 # 'function': was declared deprecated
|
||||||
<toolset>msvc:<cxxflags>/wd4244 # conversion from 'int' to 'unsigned short', possible loss of data
|
<toolset>msvc:<cxxflags>/wd4244 # conversion from 'int' to 'unsigned short', possible loss of data
|
||||||
# in date-time
|
# in date-time
|
||||||
;
|
;
|
||||||
|
|
||||||
test-suite "circular_buffer"
|
run base_test.cpp ;
|
||||||
: [ run base_test.cpp : : : <threading>single : ]
|
run space_optimized_test.cpp ;
|
||||||
[ run space_optimized_test.cpp : : : <threading>single : ]
|
run base_test.cpp : : : <define>"BOOST_CB_ENABLE_DEBUG=1" : base_test_dbg ;
|
||||||
[ run base_test.cpp : : : <threading>single <define>"BOOST_CB_ENABLE_DEBUG=1" : base_test_dbg ]
|
run space_optimized_test.cpp : : : <define>"BOOST_CB_ENABLE_DEBUG=1" : space_optimized_test_dbg ;
|
||||||
[ run space_optimized_test.cpp : : : <threading>single <define>"BOOST_CB_ENABLE_DEBUG=1" : space_optimized_test_dbg ]
|
run soft_iterator_invalidation.cpp ;
|
||||||
[ run soft_iterator_invalidation.cpp : : : <threading>single : ]
|
run constant_erase_test.cpp ;
|
||||||
[ run constant_erase_test.cpp : : : <threading>single : ]
|
compile bounded_buffer_comparison.cpp : <threading>multi <library>/boost/thread//boost_thread <library>/boost/timer//boost_timer ;
|
||||||
[ compile bounded_buffer_comparison.cpp : <threading>multi : ]
|
|
||||||
;
|
|
||||||
|
|||||||
17
test/cmake_install_test/CMakeLists.txt
Normal file
17
test/cmake_install_test/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Copyright 2018, 2019, 2026 Peter Dimov
|
||||||
|
# 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
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.5...3.31)
|
||||||
|
|
||||||
|
project(cmake_install_test LANGUAGES CXX)
|
||||||
|
|
||||||
|
find_package(boost_circular_buffer REQUIRED)
|
||||||
|
|
||||||
|
add_executable(main main.cpp)
|
||||||
|
target_link_libraries(main Boost::circular_buffer)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
add_test(main main)
|
||||||
|
|
||||||
|
add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
||||||
11
test/cmake_install_test/main.cpp
Normal file
11
test/cmake_install_test/main.cpp
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
// Copyright 2026 Peter Dimov
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#include <boost/circular_buffer.hpp>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
boost::circular_buffer<int> cb;
|
||||||
|
return cb.empty()? 0: 1;
|
||||||
|
}
|
||||||
43
test/cmake_subdir_test/CMakeLists.txt
Normal file
43
test/cmake_subdir_test/CMakeLists.txt
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# Copyright 2018, 2019, 2026 Peter Dimov
|
||||||
|
# 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
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.5...3.31)
|
||||||
|
|
||||||
|
project(cmake_subdir_test LANGUAGES CXX)
|
||||||
|
|
||||||
|
add_subdirectory(../.. boostorg/circular_buffer)
|
||||||
|
|
||||||
|
# boostdep --brief circular_buffer
|
||||||
|
|
||||||
|
set(deps
|
||||||
|
|
||||||
|
# Primary dependencies
|
||||||
|
|
||||||
|
assert
|
||||||
|
concept_check
|
||||||
|
config
|
||||||
|
core
|
||||||
|
move
|
||||||
|
throw_exception
|
||||||
|
type_traits
|
||||||
|
|
||||||
|
# Secondary dependencies
|
||||||
|
|
||||||
|
preprocessor
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach(dep IN LISTS deps)
|
||||||
|
|
||||||
|
add_subdirectory(../../../${dep} boostorg/${dep})
|
||||||
|
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
add_executable(main main.cpp)
|
||||||
|
target_link_libraries(main Boost::circular_buffer)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
add_test(main main)
|
||||||
|
|
||||||
|
add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
||||||
11
test/cmake_subdir_test/main.cpp
Normal file
11
test/cmake_subdir_test/main.cpp
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
// Copyright 2026 Peter Dimov
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#include <boost/circular_buffer.hpp>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
boost::circular_buffer<int> cb;
|
||||||
|
return cb.empty()? 0: 1;
|
||||||
|
}
|
||||||
@@ -1016,8 +1016,8 @@ void assign_test() {
|
|||||||
BOOST_TEST(cb1[5] == 7);
|
BOOST_TEST(cb1[5] == 7);
|
||||||
|
|
||||||
CB_CONTAINER<float> cb2(4);
|
CB_CONTAINER<float> cb2(4);
|
||||||
cb2.assign(3, 1.1f);
|
cb2.assign(3, 1.25f);
|
||||||
BOOST_TEST(cb2[0] == 1.1f);
|
BOOST_TEST(cb2[0] == 1.25f);
|
||||||
|
|
||||||
CB_CONTAINER<MyInteger> cb3(5);
|
CB_CONTAINER<MyInteger> cb3(5);
|
||||||
cb3.push_back(1);
|
cb3.push_back(1);
|
||||||
|
|||||||
@@ -71,6 +71,11 @@ class InstanceCounter {
|
|||||||
public:
|
public:
|
||||||
InstanceCounter() { increment(); }
|
InstanceCounter() { increment(); }
|
||||||
InstanceCounter(const InstanceCounter& y) { y.increment(); }
|
InstanceCounter(const InstanceCounter& y) { y.increment(); }
|
||||||
|
InstanceCounter& operator=(const InstanceCounter& y) {
|
||||||
|
decrement();
|
||||||
|
y.increment();
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
~InstanceCounter() { decrement(); }
|
~InstanceCounter() { decrement(); }
|
||||||
static int count() { return ms_count; }
|
static int count() { return ms_count; }
|
||||||
private:
|
private:
|
||||||
@@ -106,12 +111,9 @@ struct MyInputIterator {
|
|||||||
typedef size_t size_type;
|
typedef size_t size_type;
|
||||||
typedef ptrdiff_t difference_type;
|
typedef ptrdiff_t difference_type;
|
||||||
explicit MyInputIterator(const vector_iterator& it) : m_it(it) {}
|
explicit MyInputIterator(const vector_iterator& it) : m_it(it) {}
|
||||||
MyInputIterator& operator = (const MyInputIterator& it) {
|
|
||||||
if (this == &it)
|
// Default assignment operator
|
||||||
return *this;
|
|
||||||
m_it = it.m_it;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
reference operator * () const { return *m_it; }
|
reference operator * () const { return *m_it; }
|
||||||
pointer operator -> () const { return &(operator*()); }
|
pointer operator -> () const { return &(operator*()); }
|
||||||
MyInputIterator& operator ++ () {
|
MyInputIterator& operator ++ () {
|
||||||
|
|||||||
Reference in New Issue
Block a user