mirror of
https://github.com/boostorg/array.git
synced 2026-06-16 17:12:37 +02:00
Compare commits
27 Commits
boost-1.70.0
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| ecc47cb42c | |||
| d9ccba0907 | |||
| bdc9ff1e24 | |||
| 8ad6749d4a | |||
| ec72fd87a1 | |||
| 3dfc2a089c | |||
| b19ce675ad | |||
| c774c93b3b | |||
| 868af27d82 | |||
| 4647fc7095 | |||
| 9cc63ae0dd | |||
| a3f15458b8 | |||
| a9a3dbbc41 | |||
| e384e3780b | |||
| 63f83dc350 | |||
| 37c18b3094 | |||
| 42d974e5df | |||
| 1572eac629 | |||
| 0db8c56d3f | |||
| 674234d401 | |||
| 427c8fad2f | |||
| f0e79b8ebc | |||
| d026fbcee3 | |||
| 92f66a9f14 | |||
| e329330031 | |||
| 32b074c9ae | |||
| 453cf59eb9 |
+37
@@ -0,0 +1,37 @@
|
|||||||
|
# Use, modification, and distribution are
|
||||||
|
# subject to the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
# file LICENSE.txt)
|
||||||
|
#
|
||||||
|
# Copyright Rene Rivera 2020.
|
||||||
|
|
||||||
|
# For Drone CI we use the Starlark scripting language to reduce duplication.
|
||||||
|
# As the yaml syntax for Drone CI is rather limited.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
globalenv={}
|
||||||
|
linuxglobalimage="cppalliance/droneubuntu1604:1"
|
||||||
|
windowsglobalimage="cppalliance/dronevs2019"
|
||||||
|
|
||||||
|
def main(ctx):
|
||||||
|
return [
|
||||||
|
linux_cxx("TEST_CMAKE=TRUE Job 0", "g++", packages="", buildtype="96ad197d74-2319b6d45f", image=linuxglobalimage, environment={'TEST_CMAKE': 'TRUE', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv),
|
||||||
|
linux_cxx("TOOLSET=gcc COMPILER=g++ CXXSTD=03,11 Job 1", "g++", packages="", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv),
|
||||||
|
linux_cxx("TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11 Job 2", "g++-4.7", packages="g++-4.7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.7', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv),
|
||||||
|
linux_cxx("TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11 Job 3", "g++-4.8", packages="g++-4.8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.8', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv),
|
||||||
|
linux_cxx("TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11 Job 4", "g++-4.9", packages="g++-4.9", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.9', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': '1b64538924'}, globalenv=globalenv),
|
||||||
|
linux_cxx("TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z Job 5", "g++-5", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'ac3478d69a'}, globalenv=globalenv),
|
||||||
|
linux_cxx("TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z Job 6", "g++-6", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'c1dfd96eea'}, globalenv=globalenv),
|
||||||
|
linux_cxx("TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17 Job 7", "g++-7", packages="g++-7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '03,11,14,17', 'DRONE_JOB_UUID': '902ba3cda1'}, globalenv=globalenv),
|
||||||
|
linux_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=03,11 Job 8", "clang++", packages="", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': 'fe5dbbcea5'}, globalenv=globalenv),
|
||||||
|
linux_cxx("TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03, Job 9", "clang++", packages="clang-3.5 libstdc++-4.9-dev", llvm_os="precise", llvm_ver="3.5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.5', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '0ade7c2cf9'}, globalenv=globalenv),
|
||||||
|
linux_cxx("TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03, Job 10", "clang++", packages="clang-3.6", llvm_os="precise", llvm_ver="3.6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.6', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'b1d5781111'}, globalenv=globalenv),
|
||||||
|
linux_cxx("TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03, Job 11", "clang++", packages="clang-3.7", llvm_os="precise", llvm_ver="3.7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.7', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '17ba079149'}, globalenv=globalenv),
|
||||||
|
linux_cxx("TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03, Job 12", "clang++-3.8", packages="clang-3.8 libstdc++-4.9-dev", llvm_os="precise", llvm_ver="3.8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.8', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '7b52009b64'}, globalenv=globalenv),
|
||||||
|
linux_cxx("TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03, Job 13", "clang++-3.9", packages="clang-3.9 libstdc++-4.9-dev", llvm_os="precise", llvm_ver="3.9", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.9', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'bd307a3ec3'}, globalenv=globalenv),
|
||||||
|
linux_cxx("TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03, Job 14", "clang++-4.0", packages="clang-4.0", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-4.0', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'fa35e19212'}, globalenv=globalenv),
|
||||||
|
linux_cxx("TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03, Job 15", "clang++-5.0", packages="clang-5.0", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-5.0', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'f1abd67035'}, globalenv=globalenv),
|
||||||
|
osx_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,1 Job 16", "clang++", packages="", buildtype="boost", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '1574bddb75'}, globalenv=globalenv),
|
||||||
|
]
|
||||||
|
|
||||||
|
# from https://github.com/boostorg/boost-ci
|
||||||
|
load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx")
|
||||||
Executable
+37
@@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
export TRAVIS_BUILD_DIR=$(pwd)
|
||||||
|
export DRONE_BUILD_DIR=$(pwd)
|
||||||
|
export TRAVIS_BRANCH=$DRONE_BRANCH
|
||||||
|
export VCS_COMMIT_ID=$DRONE_COMMIT
|
||||||
|
export GIT_COMMIT=$DRONE_COMMIT
|
||||||
|
export REPO_NAME=$DRONE_REPO
|
||||||
|
export PATH=~/.local/bin:/usr/local/bin:$PATH
|
||||||
|
|
||||||
|
echo '==================================> BEFORE_INSTALL'
|
||||||
|
|
||||||
|
. .drone/before-install.sh
|
||||||
|
|
||||||
|
echo '==================================> INSTALL'
|
||||||
|
|
||||||
|
BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||||
|
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/assert.git ../assert
|
||||||
|
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/config.git ../config
|
||||||
|
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/core.git ../core
|
||||||
|
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/static_assert.git ../static_assert
|
||||||
|
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/throw_exception.git ../throw_exception
|
||||||
|
|
||||||
|
echo '==================================> BEFORE_SCRIPT'
|
||||||
|
|
||||||
|
. $DRONE_BUILD_DIR/.drone/before-script.sh
|
||||||
|
|
||||||
|
echo '==================================> SCRIPT'
|
||||||
|
|
||||||
|
mkdir __build__ && cd __build__
|
||||||
|
cmake ../test/test_cmake
|
||||||
|
cmake --build .
|
||||||
|
|
||||||
|
echo '==================================> AFTER_SUCCESS'
|
||||||
|
|
||||||
|
. $DRONE_BUILD_DIR/.drone/after-success.sh
|
||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
Executable
+41
@@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
export TRAVIS_BUILD_DIR=$(pwd)
|
||||||
|
export DRONE_BUILD_DIR=$(pwd)
|
||||||
|
export TRAVIS_BRANCH=$DRONE_BRANCH
|
||||||
|
export VCS_COMMIT_ID=$DRONE_COMMIT
|
||||||
|
export GIT_COMMIT=$DRONE_COMMIT
|
||||||
|
export REPO_NAME=$DRONE_REPO
|
||||||
|
export PATH=~/.local/bin:/usr/local/bin:$PATH
|
||||||
|
|
||||||
|
echo '==================================> BEFORE_INSTALL'
|
||||||
|
|
||||||
|
. .drone/before-install.sh
|
||||||
|
|
||||||
|
echo '==================================> INSTALL'
|
||||||
|
|
||||||
|
BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||||
|
cd ..
|
||||||
|
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
cd boost-root
|
||||||
|
git submodule update --init tools/build
|
||||||
|
git submodule update --init libs/config
|
||||||
|
git submodule update --init tools/boostdep
|
||||||
|
cp -r $TRAVIS_BUILD_DIR/* libs/array
|
||||||
|
python tools/boostdep/depinst/depinst.py array
|
||||||
|
./bootstrap.sh
|
||||||
|
./b2 headers
|
||||||
|
|
||||||
|
echo '==================================> BEFORE_SCRIPT'
|
||||||
|
|
||||||
|
. $DRONE_BUILD_DIR/.drone/before-script.sh
|
||||||
|
|
||||||
|
echo '==================================> SCRIPT'
|
||||||
|
|
||||||
|
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
|
||||||
|
./b2 -j 3 libs/array/test toolset=$TOOLSET cxxstd=$CXXSTD
|
||||||
|
|
||||||
|
echo '==================================> AFTER_SUCCESS'
|
||||||
|
|
||||||
|
. $DRONE_BUILD_DIR/.drone/after-success.sh
|
||||||
@@ -0,0 +1,609 @@
|
|||||||
|
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-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
|
install: g++-4.8-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-5
|
||||||
|
cxxstd: "03,11,14,1z"
|
||||||
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
|
install: g++-5-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-6
|
||||||
|
cxxstd: "03,11,14,1z"
|
||||||
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
|
install: g++-6-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-7
|
||||||
|
cxxstd: "03,11,14,17"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
install: g++-7-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-8
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
install: g++-8-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-9
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
install: g++-9-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-10
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
os: ubuntu-22.04
|
||||||
|
install: g++-10-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-11
|
||||||
|
cxxstd: "03,11,14,17,20"
|
||||||
|
os: ubuntu-22.04
|
||||||
|
install: g++-11-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-12
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
os: ubuntu-22.04
|
||||||
|
install: g++-12-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: gcc-13
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:23.04
|
||||||
|
install: g++-13-multilib
|
||||||
|
address-model: 32,64
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-3.9
|
||||||
|
cxxstd: "03,11,14"
|
||||||
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
|
install: clang-3.9
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-4.0
|
||||||
|
cxxstd: "03,11,14"
|
||||||
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
|
install: clang-4.0
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-5.0
|
||||||
|
cxxstd: "03,11,14,1z"
|
||||||
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
|
install: clang-5.0
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-6.0
|
||||||
|
cxxstd: "03,11,14,17"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
install: clang-6.0
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-7
|
||||||
|
cxxstd: "03,11,14,17"
|
||||||
|
os: ubuntu-20.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,2a"
|
||||||
|
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,20"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-13
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
os: ubuntu-22.04
|
||||||
|
install: clang-13
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-14
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
os: ubuntu-22.04
|
||||||
|
install: clang-14
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-15
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
os: ubuntu-22.04
|
||||||
|
install: clang-15
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-16
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:23.04
|
||||||
|
install: clang-16
|
||||||
|
- toolset: clang
|
||||||
|
cxxstd: "03,11,14,17,2a"
|
||||||
|
os: macos-11
|
||||||
|
- toolset: clang
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
os: macos-12
|
||||||
|
- toolset: clang
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
os: macos-13
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
container: ${{matrix.container}}
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup container environment
|
||||||
|
if: matrix.container
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get -y install sudo python3 git g++
|
||||||
|
|
||||||
|
- 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 --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
|
||||||
|
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.0
|
||||||
|
cxxstd: 14,latest
|
||||||
|
addrmd: 32,64
|
||||||
|
os: windows-2019
|
||||||
|
- toolset: msvc-14.2
|
||||||
|
cxxstd: "14,17,20,latest"
|
||||||
|
addrmd: 32,64
|
||||||
|
os: windows-2019
|
||||||
|
- toolset: msvc-14.3
|
||||||
|
cxxstd: "14,17,20,latest"
|
||||||
|
addrmd: 32,64
|
||||||
|
os: windows-2022
|
||||||
|
- toolset: clang-win
|
||||||
|
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@v3
|
||||||
|
|
||||||
|
- 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-20.04
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
- os: macos-11
|
||||||
|
- os: macos-12
|
||||||
|
- os: macos-13
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- 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-20.04
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
- os: macos-11
|
||||||
|
- os: macos-12
|
||||||
|
- os: macos-13
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- 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-20.04
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
- os: macos-11
|
||||||
|
- os: macos-12
|
||||||
|
- os: macos-13
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- 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-2019
|
||||||
|
- os: windows-2022
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- 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-2019
|
||||||
|
- os: windows-2022
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- 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-2019
|
||||||
|
- os: windows-2022
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- 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
|
||||||
+16
-12
@@ -1,12 +1,11 @@
|
|||||||
# Copyright 2018 Mike Dev
|
# Generated by `boostdep --cmake array`
|
||||||
|
# Copyright 2020, 2021 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
|
||||||
|
|
||||||
# NOTE: CMake support for Boost.Array is currently experimental at best
|
cmake_minimum_required(VERSION 3.5...3.20)
|
||||||
# and the interface is likely to change in the future
|
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.5)
|
project(boost_array VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||||
project(boost-array LANGUAGES CXX)
|
|
||||||
|
|
||||||
add_library(boost_array INTERFACE)
|
add_library(boost_array INTERFACE)
|
||||||
add_library(Boost::array ALIAS boost_array)
|
add_library(Boost::array ALIAS boost_array)
|
||||||
@@ -14,11 +13,16 @@ add_library(Boost::array ALIAS boost_array)
|
|||||||
target_include_directories(boost_array INTERFACE include)
|
target_include_directories(boost_array INTERFACE include)
|
||||||
|
|
||||||
target_link_libraries(boost_array
|
target_link_libraries(boost_array
|
||||||
INTERFACE
|
INTERFACE
|
||||||
Boost::assert
|
Boost::assert
|
||||||
Boost::config
|
Boost::config
|
||||||
Boost::core
|
Boost::core
|
||||||
Boost::static_assert
|
Boost::static_assert
|
||||||
Boost::throw_exception
|
Boost::throw_exception
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
|
||||||
|
|
||||||
|
add_subdirectory(test)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -41,13 +41,12 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
#include <iterator>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <boost/assert.hpp>
|
#include <boost/assert.hpp>
|
||||||
|
#include <boost/core/invoke_swap.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
#include <boost/swap.hpp>
|
|
||||||
|
|
||||||
// Handles broken standard libraries better than <iterator>
|
|
||||||
#include <boost/detail/iterator.hpp>
|
|
||||||
#include <boost/throw_exception.hpp>
|
#include <boost/throw_exception.hpp>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
@@ -157,7 +156,7 @@ namespace boost {
|
|||||||
// swap (note: linear complexity)
|
// swap (note: linear complexity)
|
||||||
void swap (array<T,N>& y) {
|
void swap (array<T,N>& y) {
|
||||||
for (size_type i = 0; i < N; ++i)
|
for (size_type i = 0; i < N; ++i)
|
||||||
boost::swap(elems[i],y.elems[i]);
|
boost::core::invoke_swap(elems[i],y.elems[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// direct access to data (read-only)
|
// direct access to data (read-only)
|
||||||
|
|||||||
+2
-1
@@ -13,5 +13,6 @@
|
|||||||
],
|
],
|
||||||
"maintainers": [
|
"maintainers": [
|
||||||
"Marshall Clow <marshall -at- idio.com>"
|
"Marshall Clow <marshall -at- idio.com>"
|
||||||
]
|
],
|
||||||
|
"cxxstd": "03"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# Copyright 2018, 2019, 2021, 2022 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::array Boost::container_hash Boost::core)
|
||||||
|
|
||||||
|
endif()
|
||||||
+13
-18
@@ -4,22 +4,17 @@
|
|||||||
|
|
||||||
import testing ;
|
import testing ;
|
||||||
|
|
||||||
alias unit_test_framework
|
run array0.cpp ;
|
||||||
: # sources
|
run array1.cpp ;
|
||||||
/boost//unit_test_framework
|
run array2.cpp ;
|
||||||
;
|
run array3.cpp ;
|
||||||
|
run array4.cpp ;
|
||||||
|
run array5.cpp ;
|
||||||
|
run array6.cpp ;
|
||||||
|
run array7.cpp ;
|
||||||
|
# run array_constexpr.cpp ;
|
||||||
|
compile-fail array_getfail1.cpp ;
|
||||||
|
compile-fail array_getfail2.cpp ;
|
||||||
|
run array_hash.cpp ;
|
||||||
|
|
||||||
test-suite array :
|
run quick.cpp ;
|
||||||
[ run array0.cpp unit_test_framework : : : : array0 ]
|
|
||||||
[ run array1.cpp ]
|
|
||||||
[ run array2.cpp ]
|
|
||||||
[ run array3.cpp ]
|
|
||||||
[ run array4.cpp ]
|
|
||||||
[ run array5.cpp ]
|
|
||||||
[ run array6.cpp unit_test_framework : : : : array6 ]
|
|
||||||
[ run array7.cpp unit_test_framework : : : : array7 ]
|
|
||||||
# [ run array_constexpr.cpp unit_test_framework : : : : array_constexpr ]
|
|
||||||
[ compile-fail array_getfail1.cpp ]
|
|
||||||
[ compile-fail array_getfail2.cpp ]
|
|
||||||
[ run array_hash.cpp unit_test_framework : : : : array_hash ]
|
|
||||||
;
|
|
||||||
|
|||||||
+14
-14
@@ -9,15 +9,14 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
|
|
||||||
#define BOOST_TEST_MAIN
|
#include <boost/core/lightweight_test_trait.hpp>
|
||||||
#include <boost/test/unit_test.hpp>
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
template< class T >
|
template< class T >
|
||||||
void BadValue( const T & )
|
void BadValue( const T & )
|
||||||
{
|
{
|
||||||
BOOST_CHECK ( false );
|
BOOST_TEST ( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
template< class T >
|
template< class T >
|
||||||
@@ -33,19 +32,19 @@ void RunTests()
|
|||||||
|
|
||||||
// front/back and operator[] must compile, but calling them is undefined
|
// front/back and operator[] must compile, but calling them is undefined
|
||||||
// Likewise, all tests below should evaluate to false, avoiding undefined behaviour
|
// Likewise, all tests below should evaluate to false, avoiding undefined behaviour
|
||||||
BOOST_CHECK ( test_case.empty());
|
BOOST_TEST ( test_case.empty());
|
||||||
BOOST_CHECK ( const_test_case.empty());
|
BOOST_TEST ( const_test_case.empty());
|
||||||
|
|
||||||
BOOST_CHECK ( test_case.size() == 0 );
|
BOOST_TEST ( test_case.size() == 0 );
|
||||||
BOOST_CHECK ( const_test_case.size() == 0 );
|
BOOST_TEST ( const_test_case.size() == 0 );
|
||||||
|
|
||||||
// Assert requirements of TR1 6.2.2.4
|
// Assert requirements of TR1 6.2.2.4
|
||||||
BOOST_CHECK ( test_case.begin() == test_case.end());
|
BOOST_TEST ( test_case.begin() == test_case.end());
|
||||||
BOOST_CHECK ( test_case.cbegin() == test_case.cend());
|
BOOST_TEST ( test_case.cbegin() == test_case.cend());
|
||||||
BOOST_CHECK ( const_test_case.begin() == const_test_case.end());
|
BOOST_TEST ( const_test_case.begin() == const_test_case.end());
|
||||||
BOOST_CHECK ( const_test_case.cbegin() == const_test_case.cend());
|
BOOST_TEST ( const_test_case.cbegin() == const_test_case.cend());
|
||||||
|
|
||||||
BOOST_CHECK ( test_case.begin() != const_test_case.begin() );
|
BOOST_TEST ( test_case.begin() != const_test_case.begin() );
|
||||||
if( test_case.data() == const_test_case.data() ) {
|
if( test_case.data() == const_test_case.data() ) {
|
||||||
// Value of data is unspecified in TR1, so no requirement this test pass or fail
|
// Value of data is unspecified in TR1, so no requirement this test pass or fail
|
||||||
// However, it must compile!
|
// However, it must compile!
|
||||||
@@ -79,11 +78,12 @@ void RunTests()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE( test_main )
|
int main()
|
||||||
{
|
{
|
||||||
RunTests< bool >();
|
RunTests< bool >();
|
||||||
RunTests< void * >();
|
RunTests< void * >();
|
||||||
RunTests< long double >();
|
RunTests< long double >();
|
||||||
RunTests< std::string >();
|
RunTests< std::string >();
|
||||||
}
|
|
||||||
|
|
||||||
|
return boost::report_errors();
|
||||||
|
}
|
||||||
|
|||||||
+9
-8
@@ -10,8 +10,7 @@
|
|||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#define BOOST_TEST_MAIN
|
#include <boost/core/lightweight_test_trait.hpp>
|
||||||
#include <boost/test/unit_test.hpp>
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
template< class T >
|
template< class T >
|
||||||
@@ -22,38 +21,40 @@ namespace {
|
|||||||
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
||||||
|
|
||||||
arr &aRef = get_c_array ( test_case );
|
arr &aRef = get_c_array ( test_case );
|
||||||
BOOST_CHECK ( &*test_case.begin () == &aRef[0] );
|
BOOST_TEST ( &*test_case.begin () == &aRef[0] );
|
||||||
|
|
||||||
const arr &caRef = get_c_array ( test_case );
|
const arr &caRef = get_c_array ( test_case );
|
||||||
typename test_type::const_iterator iter = test_case.begin ();
|
typename test_type::const_iterator iter = test_case.begin ();
|
||||||
BOOST_CHECK ( &*iter == &caRef[0] );
|
BOOST_TEST ( &*iter == &caRef[0] );
|
||||||
|
|
||||||
// Confirm at() throws the std lib defined exception
|
// Confirm at() throws the std lib defined exception
|
||||||
try {
|
try {
|
||||||
test_case.at( test_case.size());
|
test_case.at( test_case.size());
|
||||||
BOOST_CHECK(false);
|
BOOST_TEST(false);
|
||||||
}
|
}
|
||||||
catch ( const std::out_of_range & ) {}
|
catch ( const std::out_of_range & ) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
test_case.at( test_case.size() + 1);
|
test_case.at( test_case.size() + 1);
|
||||||
BOOST_CHECK(false);
|
BOOST_TEST(false);
|
||||||
}
|
}
|
||||||
catch ( const std::out_of_range & ) {}
|
catch ( const std::out_of_range & ) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
test_case.at( test_case.size() + 100);
|
test_case.at( test_case.size() + 100);
|
||||||
BOOST_CHECK(false);
|
BOOST_TEST(false);
|
||||||
}
|
}
|
||||||
catch ( const std::out_of_range & ) {}
|
catch ( const std::out_of_range & ) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE( test_main )
|
int main ()
|
||||||
{
|
{
|
||||||
RunTests< bool >();
|
RunTests< bool >();
|
||||||
RunTests< void * >();
|
RunTests< void * >();
|
||||||
RunTests< long double >();
|
RunTests< long double >();
|
||||||
RunTests< std::string >();
|
RunTests< std::string >();
|
||||||
|
|
||||||
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-9
@@ -13,8 +13,7 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BOOST_TEST_MAIN
|
#include <boost/core/lightweight_test_trait.hpp>
|
||||||
#include <boost/test/unit_test.hpp>
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@@ -23,14 +22,13 @@ namespace {
|
|||||||
void RunStdTests()
|
void RunStdTests()
|
||||||
{
|
{
|
||||||
typedef boost::array< T, 5 > test_type;
|
typedef boost::array< T, 5 > test_type;
|
||||||
typedef T arr[5];
|
|
||||||
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
||||||
|
|
||||||
T &aRef = std::get<0> ( test_case );
|
T &aRef = std::get<0> ( test_case );
|
||||||
BOOST_CHECK ( &*test_case.begin () == &aRef );
|
BOOST_TEST ( &*test_case.begin () == &aRef );
|
||||||
|
|
||||||
const T &caRef = std::get<0> ( test_case );
|
const T &caRef = std::get<0> ( test_case );
|
||||||
BOOST_CHECK ( &*test_case.cbegin () == &caRef );
|
BOOST_TEST ( &*test_case.cbegin () == &caRef );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -38,19 +36,18 @@ namespace {
|
|||||||
void RunBoostTests()
|
void RunBoostTests()
|
||||||
{
|
{
|
||||||
typedef boost::array< T, 5 > test_type;
|
typedef boost::array< T, 5 > test_type;
|
||||||
typedef T arr[5];
|
|
||||||
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
||||||
|
|
||||||
T &aRef = boost::get<0> ( test_case );
|
T &aRef = boost::get<0> ( test_case );
|
||||||
BOOST_CHECK ( &*test_case.begin () == &aRef );
|
BOOST_TEST ( &*test_case.begin () == &aRef );
|
||||||
|
|
||||||
const T &caRef = boost::get<0> ( test_case );
|
const T &caRef = boost::get<0> ( test_case );
|
||||||
BOOST_CHECK ( &*test_case.cbegin () == &caRef );
|
BOOST_TEST ( &*test_case.cbegin () == &caRef );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE( test_main )
|
int main()
|
||||||
{
|
{
|
||||||
RunBoostTests< bool >();
|
RunBoostTests< bool >();
|
||||||
RunBoostTests< void * >();
|
RunBoostTests< void * >();
|
||||||
@@ -63,5 +60,7 @@ BOOST_AUTO_TEST_CASE( test_main )
|
|||||||
RunStdTests< long double >();
|
RunStdTests< long double >();
|
||||||
RunStdTests< std::string >();
|
RunStdTests< std::string >();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,9 +13,6 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BOOST_TEST_MAIN
|
|
||||||
#include <boost/test/unit_test.hpp>
|
|
||||||
|
|
||||||
#ifndef BOOST_NO_CXX11_CONSTEXPR
|
#ifndef BOOST_NO_CXX11_CONSTEXPR
|
||||||
constexpr boost::array<int, 10> arr {{ 0,1,2,3,4,5,6,7,8,9 }};
|
constexpr boost::array<int, 10> arr {{ 0,1,2,3,4,5,6,7,8,9 }};
|
||||||
constexpr std::array<int, 10> arr_std {{ 0,1,2,3,4,5,6,7,8,9 }};
|
constexpr std::array<int, 10> arr_std {{ 0,1,2,3,4,5,6,7,8,9 }};
|
||||||
@@ -26,7 +23,7 @@ void sink ( T t ) {}
|
|||||||
template <typename T, size_t N>
|
template <typename T, size_t N>
|
||||||
void sink ( boost::array<T,N> &arr ) {}
|
void sink ( boost::array<T,N> &arr ) {}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE( test_main )
|
int main()
|
||||||
{
|
{
|
||||||
// constexpr int two = arr_std.at (2);
|
// constexpr int two = arr_std.at (2);
|
||||||
constexpr int three = arr.at (3);
|
constexpr int three = arr.at (3);
|
||||||
@@ -36,7 +33,7 @@ BOOST_AUTO_TEST_CASE( test_main )
|
|||||||
}
|
}
|
||||||
|
|
||||||
#else // no constexpr means no constexpr tests!
|
#else // no constexpr means no constexpr tests!
|
||||||
BOOST_AUTO_TEST_CASE( test_main )
|
int main()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -16,8 +16,7 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BOOST_TEST_MAIN
|
#include <boost/core/lightweight_test_trait.hpp>
|
||||||
#include <boost/test/unit_test.hpp>
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@@ -30,13 +29,13 @@ namespace {
|
|||||||
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
||||||
|
|
||||||
T &aRef = std::get<5> ( test_case ); // should fail to compile
|
T &aRef = std::get<5> ( test_case ); // should fail to compile
|
||||||
BOOST_CHECK ( &*test_case.begin () == &aRef );
|
BOOST_TEST ( &*test_case.begin () == &aRef );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE( test_main )
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef BOOST_NO_CXX11_HDR_ARRAY
|
#ifndef BOOST_NO_CXX11_HDR_ARRAY
|
||||||
RunStdTests< bool >();
|
RunStdTests< bool >();
|
||||||
@@ -46,4 +45,6 @@ BOOST_AUTO_TEST_CASE( test_main )
|
|||||||
#else
|
#else
|
||||||
BOOST_STATIC_ASSERT ( false ); // fail on C++03 systems.
|
BOOST_STATIC_ASSERT ( false ); // fail on C++03 systems.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,7 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BOOST_TEST_MAIN
|
#include <boost/core/lightweight_test_trait.hpp>
|
||||||
#include <boost/test/unit_test.hpp>
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@@ -27,10 +26,10 @@ namespace {
|
|||||||
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
||||||
|
|
||||||
T &aRef = std::get<0> ( test_case );
|
T &aRef = std::get<0> ( test_case );
|
||||||
BOOST_CHECK ( &*test_case.begin () == &aRef );
|
BOOST_TEST ( &*test_case.begin () == &aRef );
|
||||||
|
|
||||||
const T &caRef = std::get<0> ( test_case );
|
const T &caRef = std::get<0> ( test_case );
|
||||||
BOOST_CHECK ( &*test_case.cbegin () == &caRef );
|
BOOST_TEST ( &*test_case.cbegin () == &caRef );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -42,12 +41,12 @@ namespace {
|
|||||||
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
test_type test_case; // = { 1, 1, 2, 3, 5 };
|
||||||
|
|
||||||
T &aRef = boost::get<5> ( test_case );
|
T &aRef = boost::get<5> ( test_case );
|
||||||
BOOST_CHECK ( &*test_case.begin () == &aRef );
|
BOOST_TEST ( &*test_case.begin () == &aRef );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE( test_main )
|
int main()
|
||||||
{
|
{
|
||||||
RunBoostTests< bool >();
|
RunBoostTests< bool >();
|
||||||
RunBoostTests< void * >();
|
RunBoostTests< void * >();
|
||||||
@@ -60,5 +59,7 @@ BOOST_AUTO_TEST_CASE( test_main )
|
|||||||
RunStdTests< long double >();
|
RunStdTests< long double >();
|
||||||
RunStdTests< std::string >();
|
RunStdTests< std::string >();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-4
@@ -11,8 +11,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <boost/functional/hash.hpp>
|
#include <boost/functional/hash.hpp>
|
||||||
|
|
||||||
#define BOOST_TEST_MAIN
|
#include <boost/core/lightweight_test_trait.hpp>
|
||||||
#include <boost/test/unit_test.hpp>
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@@ -29,15 +28,17 @@ namespace {
|
|||||||
|
|
||||||
std::size_t bhash = boost::hash<barr> () ( test_barr );
|
std::size_t bhash = boost::hash<barr> () ( test_barr );
|
||||||
std::size_t ahash = boost::hash<arr> () ( test_arr );
|
std::size_t ahash = boost::hash<arr> () ( test_arr );
|
||||||
BOOST_CHECK ( ahash == bhash );
|
BOOST_TEST ( ahash == bhash );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE( test_main )
|
int main()
|
||||||
{
|
{
|
||||||
RunTests< int >();
|
RunTests< int >();
|
||||||
RunTests< long >();
|
RunTests< long >();
|
||||||
RunTests< long double >();
|
RunTests< long double >();
|
||||||
|
|
||||||
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Copyright 2018, 2019, 2021 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.20)
|
||||||
|
|
||||||
|
project(cmake_install_test LANGUAGES CXX)
|
||||||
|
|
||||||
|
find_package(boost_array REQUIRED)
|
||||||
|
|
||||||
|
add_executable(quick ../quick.cpp)
|
||||||
|
target_link_libraries(quick Boost::array)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
add_test(quick quick)
|
||||||
|
|
||||||
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Copyright 2018, 2019, 2021 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.20)
|
||||||
|
|
||||||
|
project(cmake_subdir_test LANGUAGES CXX)
|
||||||
|
|
||||||
|
add_subdirectory(../.. boostorg/array)
|
||||||
|
|
||||||
|
add_subdirectory(../../../assert boostorg/assert)
|
||||||
|
add_subdirectory(../../../config boostorg/config)
|
||||||
|
add_subdirectory(../../../core boostorg/core)
|
||||||
|
add_subdirectory(../../../static_assert boostorg/static_assert)
|
||||||
|
add_subdirectory(../../../throw_exception boostorg/throw_exception)
|
||||||
|
|
||||||
|
add_executable(quick ../quick.cpp)
|
||||||
|
target_link_libraries(quick Boost::array)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
add_test(quick quick)
|
||||||
|
|
||||||
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
// Copyright 2023 Peter Dimov.
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// https://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#include <boost/array.hpp>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
boost::array<int, 2> a = {{ 0, 1 }};
|
||||||
|
return a[0];
|
||||||
|
}
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# Copyright 2018 Mike Dev
|
|
||||||
# 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
|
|
||||||
#
|
|
||||||
# NOTE: This does NOT run the unit tests for Boost.Array.
|
|
||||||
# It only tests, if the CMakeLists.txt file in it's root works as expected
|
|
||||||
|
|
||||||
cmake_minimum_required( VERSION 3.5 )
|
|
||||||
|
|
||||||
project( BoostBindCMakeSelfTest )
|
|
||||||
|
|
||||||
add_subdirectory( ../../../assert ${CMAKE_CURRENT_BINARY_DIR}/libs/assert )
|
|
||||||
add_subdirectory( ../../../config ${CMAKE_CURRENT_BINARY_DIR}/libs/config )
|
|
||||||
add_subdirectory( ../../../core ${CMAKE_CURRENT_BINARY_DIR}/libs/core )
|
|
||||||
add_subdirectory( ../../../static_assert ${CMAKE_CURRENT_BINARY_DIR}/libs/static_assert )
|
|
||||||
add_subdirectory( ../../../throw_exception ${CMAKE_CURRENT_BINARY_DIR}/libs/thorw_exception )
|
|
||||||
|
|
||||||
add_subdirectory( ../.. ${CMAKE_CURRENT_BINARY_DIR}/libs/boost_array )
|
|
||||||
|
|
||||||
add_executable( boost_array_cmake_self_test main.cpp )
|
|
||||||
target_link_libraries( boost_array_cmake_self_test Boost::array )
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#include <boost/array.hpp>
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
boost::array<int,5> a{};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user