mirror of
https://github.com/boostorg/function.git
synced 2026-01-29 19:42:09 +00:00
Compare commits
21 Commits
boost-1.75
...
feature/wa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
acaca854c4 | ||
|
|
277757befc | ||
|
|
61479788b8 | ||
|
|
e47b6a51e4 | ||
|
|
bf8898c95f | ||
|
|
e0477637eb | ||
|
|
24dfb4f560 | ||
|
|
a60ee51957 | ||
|
|
6d98696d74 | ||
|
|
223749287a | ||
|
|
78a03cb7bc | ||
|
|
bc16eee025 | ||
|
|
848b0b219d | ||
|
|
bd979303a2 | ||
|
|
06357e16d0 | ||
|
|
10ab375aef | ||
|
|
37a1fa3f6a | ||
|
|
a2f088db05 | ||
|
|
c197ec934e | ||
|
|
8b1a23033d | ||
|
|
fc28657f34 |
355
.github/workflows/ci.yml
vendored
Normal file
355
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,355 @@
|
|||||||
|
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"
|
||||||
|
os: ubuntu-18.04
|
||||||
|
install: g++-4.8
|
||||||
|
- toolset: gcc-5
|
||||||
|
cxxstd: "03,11,14,1z"
|
||||||
|
os: ubuntu-18.04
|
||||||
|
install: g++-5
|
||||||
|
- toolset: gcc-6
|
||||||
|
cxxstd: "03,11,14,1z"
|
||||||
|
os: ubuntu-18.04
|
||||||
|
install: g++-6
|
||||||
|
- toolset: gcc-7
|
||||||
|
cxxstd: "03,11,14,17"
|
||||||
|
os: ubuntu-18.04
|
||||||
|
- toolset: gcc-8
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
os: ubuntu-18.04
|
||||||
|
install: g++-8
|
||||||
|
- toolset: gcc-9
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
- toolset: gcc-10
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
install: g++-10
|
||||||
|
- toolset: gcc-11
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
install: g++-11
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-3.9
|
||||||
|
cxxstd: "03,11,14"
|
||||||
|
os: ubuntu-18.04
|
||||||
|
install: clang-3.9
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-4.0
|
||||||
|
cxxstd: "03,11,14"
|
||||||
|
os: ubuntu-18.04
|
||||||
|
install: clang-4.0
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-5.0
|
||||||
|
cxxstd: "03,11,14,1z"
|
||||||
|
os: ubuntu-18.04
|
||||||
|
install: clang-5.0
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-6.0
|
||||||
|
cxxstd: "03,11,14,17"
|
||||||
|
os: ubuntu-18.04
|
||||||
|
install: clang-6.0
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-7
|
||||||
|
cxxstd: "03,11,14,17"
|
||||||
|
os: ubuntu-18.04
|
||||||
|
install: clang-7
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-8
|
||||||
|
cxxstd: "03,11,14,17"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
install: clang-8
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-9
|
||||||
|
cxxstd: "03,11,14,17"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
install: clang-9
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-10
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-11
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-12
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
- toolset: clang
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
os: macos-10.15
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
if: matrix.install
|
||||||
|
run: sudo apt 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
|
||||||
|
./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
|
||||||
|
./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release
|
||||||
|
|
||||||
|
windows:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- toolset: msvc-14.0
|
||||||
|
cxxstd: "14"
|
||||||
|
addrmd: 32,64
|
||||||
|
os: windows-2019
|
||||||
|
- toolset: msvc-14.1
|
||||||
|
cxxstd: "14,17,latest"
|
||||||
|
addrmd: 32,64
|
||||||
|
os: windows-2016
|
||||||
|
- toolset: msvc-14.2
|
||||||
|
cxxstd: "14,17,latest"
|
||||||
|
addrmd: 32,64
|
||||||
|
os: windows-2019
|
||||||
|
- toolset: msvc-14.3
|
||||||
|
cxxstd: "14,17,latest"
|
||||||
|
addrmd: 32,64
|
||||||
|
os: windows-2022
|
||||||
|
- toolset: gcc
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
addrmd: 64
|
||||||
|
os: windows-2019
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- 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%
|
||||||
|
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
|
||||||
|
|
||||||
|
posix-cmake-subdir:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-18.04
|
||||||
|
- os: ubuntu-20.04
|
||||||
|
- os: macos-10.15
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
if: matrix.install
|
||||||
|
run: sudo apt 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-18.04
|
||||||
|
- os: ubuntu-20.04
|
||||||
|
- os: macos-10.15
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
if: matrix.install
|
||||||
|
run: sudo apt 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-18.04
|
||||||
|
- os: ubuntu-20.04
|
||||||
|
- os: macos-10.15
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
if: matrix.install
|
||||||
|
run: sudo apt 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
|
||||||
76
.travis.yml
76
.travis.yml
@@ -124,21 +124,11 @@ matrix:
|
|||||||
- os: linux
|
- os: linux
|
||||||
dist: bionic
|
dist: bionic
|
||||||
compiler: g++-10
|
compiler: g++-10
|
||||||
env: TOOLSET=gcc CXXSTD=03,11,14,17,2a
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- g++-10
|
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
|
|
||||||
- os: linux
|
|
||||||
compiler: g++-9
|
|
||||||
env: UBSAN=1 TOOLSET=gcc CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1 LINKFLAGS=-fuse-ld=gold
|
env: UBSAN=1 TOOLSET=gcc CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1 LINKFLAGS=-fuse-ld=gold
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- g++-9
|
- g++-10
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
@@ -263,7 +253,7 @@ matrix:
|
|||||||
- llvm-toolchain-xenial-8
|
- llvm-toolchain-xenial-8
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
dist: xenial
|
dist: bionic
|
||||||
compiler: clang++-9
|
compiler: clang++-9
|
||||||
env: TOOLSET=clang CXXSTD=03,11,14,17,2a
|
env: TOOLSET=clang CXXSTD=03,11,14,17,2a
|
||||||
addons:
|
addons:
|
||||||
@@ -272,11 +262,11 @@ matrix:
|
|||||||
- clang-9
|
- clang-9
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main'
|
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
|
||||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
dist: xenial
|
dist: bionic
|
||||||
compiler: clang++-10
|
compiler: clang++-10
|
||||||
env: TOOLSET=clang CXXSTD=03,11,14,17,2a
|
env: TOOLSET=clang CXXSTD=03,11,14,17,2a
|
||||||
addons:
|
addons:
|
||||||
@@ -285,28 +275,34 @@ matrix:
|
|||||||
- clang-10
|
- clang-10
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main'
|
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
|
||||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-8
|
dist: bionic
|
||||||
|
compiler: clang++-11
|
||||||
|
env: TOOLSET=clang CXXSTD=03,11,14,17,2a
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- clang-11
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main'
|
||||||
|
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
dist: bionic
|
||||||
|
compiler: clang++-12
|
||||||
env: UBSAN=1 TOOLSET=clang CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1
|
env: UBSAN=1 TOOLSET=clang CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- clang-8
|
- clang-12
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- llvm-toolchain-xenial-8
|
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-12 main'
|
||||||
|
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||||
- os: linux
|
|
||||||
dist: trusty
|
|
||||||
compiler: clang++-libc++
|
|
||||||
env: TOOLSET=clang CXXSTD=03,11,14,1z
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- libc++-dev
|
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
dist: trusty
|
dist: trusty
|
||||||
@@ -317,14 +313,34 @@ matrix:
|
|||||||
packages:
|
packages:
|
||||||
- libc++-dev
|
- libc++-dev
|
||||||
|
|
||||||
- os: osx
|
- os: linux
|
||||||
compiler: clang++
|
dist: bionic
|
||||||
env: TOOLSET=clang CXXSTD=03,11,14,1z
|
compiler: clang++-libc++
|
||||||
|
env: UBSAN=1 TOOLSET=clang CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- libc++-dev
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
env: UBSAN=1 TOOLSET=clang CXXSTD=03,11,14,1z UBSAN_OPTIONS=print_stacktrace=1
|
env: UBSAN=1 TOOLSET=clang CXXSTD=03,11,14,1z UBSAN_OPTIONS=print_stacktrace=1
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
env: CMAKE_TEST=1
|
||||||
|
script:
|
||||||
|
- mkdir __build__ && cd __build__
|
||||||
|
- cmake -DBOOST_ENABLE_CMAKE=1 -DBUILD_TESTING=ON -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=function ..
|
||||||
|
- ctest --output-on-failure -R boost_function
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
env: CMAKE_SUBDIR_TEST=1
|
||||||
|
script:
|
||||||
|
- cd libs/function/test/cmake_subdir_test && mkdir __build__ && cd __build__
|
||||||
|
- cmake ..
|
||||||
|
- cmake --build .
|
||||||
|
- cmake --build . --target check
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||||
- cd ..
|
- cd ..
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
# Copyright 2019 Peter Dimov
|
# Generated by `boostdep --cmake function`
|
||||||
|
# Copyright 2020 Peter Dimov
|
||||||
# Distributed under the Boost Software License, Version 1.0.
|
# 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
|
# https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
# Partial (add_subdirectory only) and experimental CMake support
|
cmake_minimum_required(VERSION 3.5...3.16)
|
||||||
# Subject to change; please do not rely on the contents of this file yet
|
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.5)
|
project(boost_function VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||||
project(BoostFunction LANGUAGES CXX)
|
|
||||||
|
|
||||||
add_library(boost_function INTERFACE)
|
add_library(boost_function INTERFACE)
|
||||||
add_library(Boost::function ALIAS boost_function)
|
add_library(Boost::function ALIAS boost_function)
|
||||||
@@ -14,15 +13,22 @@ add_library(Boost::function ALIAS boost_function)
|
|||||||
target_include_directories(boost_function INTERFACE include)
|
target_include_directories(boost_function INTERFACE include)
|
||||||
|
|
||||||
target_link_libraries(boost_function
|
target_link_libraries(boost_function
|
||||||
INTERFACE
|
INTERFACE
|
||||||
Boost::assert
|
Boost::assert
|
||||||
Boost::bind
|
Boost::bind
|
||||||
Boost::config
|
Boost::config
|
||||||
Boost::core
|
Boost::core
|
||||||
Boost::integer
|
Boost::integer
|
||||||
Boost::preprocessor
|
Boost::preprocessor
|
||||||
Boost::throw_exception
|
Boost::throw_exception
|
||||||
Boost::type_index
|
Boost::type_index
|
||||||
Boost::type_traits
|
Boost::type_traits
|
||||||
Boost::typeof
|
Boost::typeof
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
|
||||||
|
|
||||||
|
add_subdirectory(test)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ environment:
|
|||||||
matrix:
|
matrix:
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0
|
TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0
|
||||||
|
ADDRMD: 32
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
TOOLSET: msvc-12.0,msvc-14.0
|
TOOLSET: msvc-12.0,msvc-14.0
|
||||||
ADDRMD: 32,64
|
ADDRMD: 32,64
|
||||||
@@ -29,7 +30,7 @@ environment:
|
|||||||
ADDRMD: 64
|
ADDRMD: 64
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
TOOLSET: msvc-14.2
|
TOOLSET: msvc-14.2
|
||||||
CXXSTD: 14,17
|
CXXSTD: 14,17,latest
|
||||||
ADDRMD: 32,64
|
ADDRMD: 32,64
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
ADDPATH: C:\cygwin\bin;
|
ADDPATH: C:\cygwin\bin;
|
||||||
|
|||||||
@@ -86,12 +86,21 @@ namespace boost {
|
|||||||
typedef void (*func_ptr_t)();
|
typedef void (*func_ptr_t)();
|
||||||
mutable func_ptr_t func_ptr;
|
mutable func_ptr_t func_ptr;
|
||||||
|
|
||||||
|
#if defined(BOOST_MSVC) && BOOST_MSVC >= 1929
|
||||||
|
# pragma warning(push)
|
||||||
|
# pragma warning(disable: 5243)
|
||||||
|
#endif
|
||||||
|
|
||||||
// For bound member pointers
|
// For bound member pointers
|
||||||
struct bound_memfunc_ptr_t {
|
struct bound_memfunc_ptr_t {
|
||||||
void (X::*memfunc_ptr)(int);
|
void (X::*memfunc_ptr)(int);
|
||||||
void* obj_ptr;
|
void* obj_ptr;
|
||||||
} bound_memfunc_ptr;
|
} bound_memfunc_ptr;
|
||||||
|
|
||||||
|
#if defined(BOOST_MSVC) && BOOST_MSVC >= 1929
|
||||||
|
# pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
// For references to function objects. We explicitly keep
|
// For references to function objects. We explicitly keep
|
||||||
// track of the cv-qualifiers on the object referenced.
|
// track of the cv-qualifiers on the object referenced.
|
||||||
struct obj_ref_t {
|
struct obj_ref_t {
|
||||||
|
|||||||
@@ -1010,8 +1010,16 @@ namespace boost {
|
|||||||
# pragma GCC diagnostic pop
|
# pragma GCC diagnostic pop
|
||||||
# endif
|
# endif
|
||||||
} else
|
} else
|
||||||
|
#if defined(BOOST_GCC) && (__GNUC__ == 11)
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
// False positive in GCC 11 for empty function objects (function_n_test.cpp:673)
|
||||||
|
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||||
|
#endif
|
||||||
get_vtable()->base.manager(f.functor, this->functor,
|
get_vtable()->base.manager(f.functor, this->functor,
|
||||||
boost::detail::function::move_functor_tag);
|
boost::detail::function::move_functor_tag);
|
||||||
|
#if defined(BOOST_GCC) && (__GNUC__ == 11)
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
f.vtable = 0;
|
f.vtable = 0;
|
||||||
} else {
|
} else {
|
||||||
clear();
|
clear();
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
"Programming"
|
"Programming"
|
||||||
],
|
],
|
||||||
"maintainers": [
|
"maintainers": [
|
||||||
"Peter Dimov <pdimov -at- pdimov.com>"
|
"Peter Dimov <pdimov -at- gmail.com>"
|
||||||
]
|
],
|
||||||
|
"cxxstd": "03"
|
||||||
}
|
}
|
||||||
|
|||||||
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::function Boost::core Boost::lambda)
|
||||||
|
|
||||||
|
endif()
|
||||||
@@ -9,6 +9,15 @@
|
|||||||
|
|
||||||
import testing ;
|
import testing ;
|
||||||
|
|
||||||
|
project
|
||||||
|
: default-build
|
||||||
|
<warnings>extra
|
||||||
|
: requirements
|
||||||
|
<toolset>msvc:<warnings-as-errors>on
|
||||||
|
<toolset>gcc:<warnings-as-errors>on
|
||||||
|
<toolset>clang:<warnings-as-errors>on
|
||||||
|
;
|
||||||
|
|
||||||
run function_test.cpp ;
|
run function_test.cpp ;
|
||||||
# /usr/include/c++/4.4/bits/shared_ptr.h:146: error: cannot use typeid with -fno-rtti
|
# /usr/include/c++/4.4/bits/shared_ptr.h:146: error: cannot use typeid with -fno-rtti
|
||||||
run function_test.cpp : : : <rtti>off <toolset>gcc-4.4.7,<cxxstd>0x:<build>no : function_test_no_rtti ;
|
run function_test.cpp : : : <rtti>off <toolset>gcc-4.4.7,<cxxstd>0x:<build>no : function_test_no_rtti ;
|
||||||
|
|||||||
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 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.16)
|
||||||
|
|
||||||
|
project(cmake_install_test LANGUAGES CXX)
|
||||||
|
|
||||||
|
find_package(boost_function REQUIRED)
|
||||||
|
|
||||||
|
add_executable(main main.cpp)
|
||||||
|
target_link_libraries(main Boost::function)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
add_test(main main)
|
||||||
|
|
||||||
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
||||||
22
test/cmake_install_test/main.cpp
Normal file
22
test/cmake_install_test/main.cpp
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
// Copyright 2017, 2021 Peter Dimov.
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
// See library home page at http://www.boost.org/libs/function
|
||||||
|
|
||||||
|
#include <boost/function.hpp>
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
|
#define BOOST_TEST(expr) assert(expr)
|
||||||
|
#define BOOST_TEST_EQ(x1, x2) assert((x1)==(x2))
|
||||||
|
|
||||||
|
int add( int x, int y )
|
||||||
|
{
|
||||||
|
return x + y;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
boost::function<int(int, int)> fn( &add );
|
||||||
|
BOOST_TEST_EQ( fn( 1, 2 ), 3 );
|
||||||
|
}
|
||||||
@@ -7,6 +7,12 @@
|
|||||||
|
|
||||||
// For more information, see http://www.boost.org
|
// For more information, see http://www.boost.org
|
||||||
|
|
||||||
|
#if defined(__clang__) && defined(__has_warning)
|
||||||
|
# if __has_warning( "-Wself-assign-overloaded" )
|
||||||
|
# pragma clang diagnostic ignored "-Wself-assign-overloaded"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|||||||
@@ -7,6 +7,12 @@
|
|||||||
|
|
||||||
// For more information, see http://www.boost.org
|
// For more information, see http://www.boost.org
|
||||||
|
|
||||||
|
#if defined(__clang__) && defined(__has_warning)
|
||||||
|
# if __has_warning( "-Wself-assign-overloaded" )
|
||||||
|
# pragma clang diagnostic ignored "-Wself-assign-overloaded"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
struct Y {
|
struct Y {
|
||||||
Y(int y = 0) : y_(y) {}
|
Y(int y = 0) : y_(y) {}
|
||||||
bool operator==(const Y& rhs) { return y_ == rhs.y_; }
|
bool operator==(const Y& rhs) const { return y_ == rhs.y_; }
|
||||||
private:
|
private:
|
||||||
int y_;
|
int y_;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
struct Y {
|
struct Y {
|
||||||
Y(int y = 0) : y_(y) {}
|
Y(int y = 0) : y_(y) {}
|
||||||
bool operator==(const Y& rhs) { return y_ == rhs.y_; }
|
bool operator==(const Y& rhs) const { return y_ == rhs.y_; }
|
||||||
private:
|
private:
|
||||||
int y_;
|
int y_;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,6 +8,11 @@
|
|||||||
|
|
||||||
// For more information, see http://www.boost.org/
|
// For more information, see http://www.boost.org/
|
||||||
|
|
||||||
|
#if defined(__clang__) && defined(__has_warning)
|
||||||
|
# if __has_warning( "-Wdeprecated-declarations" )
|
||||||
|
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|||||||
@@ -8,6 +8,11 @@
|
|||||||
|
|
||||||
// For more information, see http://www.boost.org/
|
// For more information, see http://www.boost.org/
|
||||||
|
|
||||||
|
#if defined(__clang__) && defined(__has_warning)
|
||||||
|
# if __has_warning( "-Wdeprecated-declarations" )
|
||||||
|
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|||||||
Reference in New Issue
Block a user