Skip to content

Commit 7244ad7

Browse files
committedMay 27, 2018
Added CI framework
- travis with valgrind, cppcheck, ubsan, codecov, covscan (future) - appveyor with MSVC 2010 through 2017, cygwin 32/64, mingw 32/64 - README, LICENSE, etc.
1 parent 1d232e4 commit 7244ad7

13 files changed

+546
-1
lines changed
 

‎.codecov.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fixes:
2+
- home/travis/build/*/boost-root/boost/::include/boost/
3+
- home/travis/build/*/boost-root/libs/*/src/::src/

‎.travis.yml

+172
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
# Copyright 2016 Peter Dimov
2+
# Copyright 2017, 2018 James E. King III
3+
# Distributed under the Boost Software License, Version 1.0.
4+
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
5+
6+
#
7+
# Generic Travis CI build script for boostorg repositories
8+
#
9+
# Instructions for customizing this script for your library:
10+
#
11+
# 1. Copy the ci/ directory from the same source into your project:
12+
# ci/build.sh runs the build
13+
# ci/codecov.sh is used to run a profiling build and upload results to codecov.io
14+
# ci/coverity.sh is used to run a coverity build and upload results to coverity scan
15+
# 2. Customize the compilers and language levels you want. Default is C++03.
16+
# 3. Update the global B2 environment settings to your liking.
17+
# 4. If you have more than include/, src/, and test/ directories then
18+
# add them to the depinst.py line as "--include tools" for tools/ (you
19+
# can put multiple --include on the command line).
20+
# 5. If you want to enable Coverity Scan, you need to provide the environment
21+
# variables COVERITY_SCAN_TOKEN and COVERITY_SCAN_NOTIFICATION_EMAIL in
22+
# your github settings.
23+
# 6. Enable pull request builds in your boostorg/<library> account.
24+
# 7. Change the default C++ version in ci/*.sh (search for CXXSTD)
25+
#
26+
# That's it - the scripts will do everything else for you.
27+
28+
sudo: false
29+
dist: trusty
30+
language: cpp
31+
32+
env:
33+
global:
34+
# see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
35+
# to use the default for a given environment, comment it out; recommend you build debug and release however..
36+
# - B2_ADDRESS_MODEL=address-model=64,32
37+
# - B2_LINK=link=shared,static
38+
# - B2_THREADING=threading=multi,single
39+
- B2_VARIANT=variant=release,debug
40+
41+
install:
42+
- export SELF=`basename $TRAVIS_BUILD_DIR`
43+
- cd ..
44+
- git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
45+
- cd boost-root
46+
- git submodule update -q --init tools/boostdep
47+
- git submodule update -q --init tools/build
48+
- git submodule update -q --init tools/inspect
49+
- cp -r $TRAVIS_BUILD_DIR/* libs/$SELF
50+
- export BOOST_ROOT="`pwd`"
51+
- export PATH="`pwd`":$PATH
52+
- python tools/boostdep/depinst/depinst.py --include example $SELF
53+
- ./bootstrap.sh
54+
- ./b2 headers
55+
56+
addons:
57+
apt:
58+
packages:
59+
- binutils-gold
60+
- gdb
61+
- libc6-dbg
62+
63+
branches:
64+
only:
65+
- develop
66+
- master
67+
68+
script:
69+
- cd libs/$SELF
70+
- ci/build.sh
71+
72+
jobs:
73+
include:
74+
#################### Jobs to run on every pull request ####################
75+
- os: linux
76+
env:
77+
- COMMENT="C++03"
78+
- TOOLSET=gcc,gcc-7,clang
79+
addons:
80+
apt:
81+
packages:
82+
- g++-7
83+
sources:
84+
- ubuntu-toolchain-r-test
85+
- os: linux
86+
env:
87+
- COMMENT="C++11"
88+
- TOOLSET=gcc,gcc-7,clang
89+
- CXXSTD=11
90+
addons:
91+
apt:
92+
packages:
93+
- g++-7
94+
sources:
95+
- ubuntu-toolchain-r-test
96+
- os: linux
97+
env:
98+
- COMMENT=valgrind
99+
- TOOLSET=clang
100+
- B2_VARIANT=variant=debug
101+
- TESTFLAGS=testing.launcher=valgrind
102+
- VALGRIND_OPTS=--error-exitcode=1
103+
addons:
104+
apt:
105+
packages:
106+
- clang-5.0
107+
- libstdc++-7-dev
108+
- valgrind
109+
sources:
110+
- llvm-toolchain-trusty-5.0
111+
- ubuntu-toolchain-r-test
112+
113+
- os: linux
114+
env:
115+
- COMMENT=cppcheck
116+
script:
117+
- libs/$SELF/ci/cppcheck.sh
118+
119+
- os: linux
120+
env:
121+
- COMMENT=UBSAN
122+
- B2_VARIANT=variant=debug
123+
- TOOLSET=gcc-7
124+
- CXXFLAGS="cxxflags=-fno-omit-frame-pointer cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined"
125+
- LINKFLAGS="linkflags=-fsanitize=undefined linkflags=-fno-sanitize-recover=undefined linkflags=-fuse-ld=gold"
126+
- UBSAN_OPTIONS=print_stacktrace=1
127+
addons:
128+
apt:
129+
packages:
130+
- g++-7
131+
sources:
132+
- ubuntu-toolchain-r-test
133+
134+
- os: linux
135+
env:
136+
- COMMENT=CodeCov
137+
- TOOLSET=gcc-7
138+
addons:
139+
apt:
140+
packages:
141+
- gcc-7
142+
- g++-7
143+
sources:
144+
- ubuntu-toolchain-r-test
145+
script:
146+
- pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && cd lcov && sudo make install && which lcov && lcov --version && popd
147+
- cd libs/$SELF
148+
- ci/codecov.sh
149+
150+
- os: osx
151+
osx_image: xcode9
152+
env:
153+
- TOOLSET=clang
154+
- CXXSTD=03,11
155+
156+
#################### Jobs to run on pushes to master, develop ###################
157+
158+
# Coverity Scan
159+
- os: linux
160+
if: (env(COVERITY_SCAN_TOKEN) IS present) AND (branch IN (develop, master)) AND (type IN (cron, push))
161+
env:
162+
- COMMENT="Coverity Scan"
163+
- TOOLSET=gcc
164+
script:
165+
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
166+
- cd libs/$SELF
167+
- ci/coverity.sh
168+
169+
notifications:
170+
email:
171+
false
172+

‎Jamfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Boost.PropertyMap Library Jamfile
2+
#
3+
# Copyright (c) 2018 James E. King III
4+
#
5+
# Use, modification, and distribution are subject to the
6+
# Boost Software License, Version 1.0. (See accompanying file
7+
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8+
9+
# please order by name to ease maintenance
10+
build-project example ;
11+
build-project test ;

‎LICENSE

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Boost Software License - Version 1.0 - August 17th, 2003
2+
3+
Permission is hereby granted, free of charge, to any person or organization
4+
obtaining a copy of the software and accompanying documentation covered by
5+
this license (the "Software") to use, reproduce, display, distribute,
6+
execute, and transmit the Software, and to prepare derivative works of the
7+
Software, and to permit third-parties to whom the Software is furnished to
8+
do so, all subject to the following:
9+
10+
The copyright notices in the Software and this entire statement, including
11+
the above license grant, this restriction and the following disclaimer,
12+
must be included in all copies of the Software, in whole or in part, and
13+
all derivative works of the Software, unless such copies or derivative
14+
works are solely in the form of machine-executable object code generated by
15+
a source language processor.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
20+
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
21+
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
22+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23+
DEALINGS IN THE SOFTWARE.

‎README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
PropertyMap, part of collection of the [Boost C++ Libraries](http://github.com/boostorg),
2+
define a general purpose interface for mapping key objects to corresponding value objects, thereby hiding the details of how the mapping is implemented from algorithms.
3+
4+
### License
5+
6+
Distributed under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
7+
8+
### Properties
9+
10+
* C++03
11+
* Header-only
12+
13+
### Build Status
14+
15+
Branch | Travis | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests |
16+
:-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- |
17+
[`master`](https://github.com/boostorg/property_map/tree/master) | [![Build Status](https://travis-ci.org/boostorg/property_map.svg?branch=master)](https://travis-ci.org/boostorg/property_map) | [![Build status](https://ci.appveyor.com/api/projects/status/vwj0va6smicyir8i/branch/master?svg=true)](https://ci.appveyor.com/project/jeking3/property_map-ugm8o/branch/master) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/13982/badge.svg)](https://scan.coverity.com/projects/boostorg-property_map) | [![codecov](https://codecov.io/gh/boostorg/property_map/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/property_map/branch/master)| [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/property_map.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/property_map.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/property_map.html)
18+
[`develop`](https://github.com/boostorg/property_map/tree/develop) | [![Build Status](https://travis-ci.org/boostorg/property_map.svg?branch=develop)](https://travis-ci.org/boostorg/property_map) | [![Build status](https://ci.appveyor.com/api/projects/status/vwj0va6smicyir8i/branch/develop?svg=true)](https://ci.appveyor.com/project/jeking3/property_map-ugm8o/branch/develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/13982/badge.svg)](https://scan.coverity.com/projects/boostorg-property_map) | [![codecov](https://codecov.io/gh/boostorg/property_map/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/property_map/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/property_map.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/property_map.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/property_map.html)
19+
20+
### Directories
21+
22+
| Name | Purpose |
23+
| ----------- | ------------------------------ |
24+
| `ci` | continuous integration scripts |
25+
| `doc` | documentation |
26+
| `example` | examples |
27+
| `include` | headers |
28+
| `test` | unit tests |
29+
30+
### More information
31+
32+
* [Ask questions](http://stackoverflow.com/questions/ask?tags=c%2B%2B,boost,boost-property_map)
33+
* [Report bugs](https://github.com/boostorg/property_map/issues): Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
34+
* Submit your patches as pull requests against **develop** branch. Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
35+
* Discussions about the library are held on the [Boost developers mailing list](http://www.boost.org/community/groups.html#main). Be sure to read the [discussion policy](http://www.boost.org/community/policy.html) before posting and add the `[property_map]` tag at the beginning of the subject line.
36+

‎appveyor.yml

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Copyright 2016, 2017 Peter Dimov
2+
# Copyright (C) 2017, 2018 James E. King III
3+
# Distributed under the Boost Software License, Version 1.0.
4+
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
5+
6+
version: 1.0.{build}-{branch}
7+
8+
shallow_clone: true
9+
10+
branches:
11+
only:
12+
- develop
13+
- master
14+
15+
matrix:
16+
allow_failures:
17+
- MAYFAIL: true
18+
19+
environment:
20+
global:
21+
# see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
22+
# to use the default for a given environment, comment it out; recommend you build debug and release however..
23+
# on Windows it is important to exercise all the possibilities, especially shared vs static
24+
# B2_ADDRESS_MODEL: address-model=64,32
25+
# B2_LINK: link=shared,static
26+
# B2_THREADING: threading=multi,single
27+
B2_VARIANT: variant=release,debug
28+
CXXSTD: 03
29+
30+
matrix:
31+
- FLAVOR: Visual Studio 2017
32+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
33+
TOOLSET: msvc-14.1
34+
B2_ADDRESS_MODEL: address-model=64,32
35+
- FLAVOR: Visual Studio 2015
36+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
37+
TOOLSET: msvc-14.0
38+
B2_ADDRESS_MODEL: address-model=64,32
39+
- FLAVOR: Visual Studio 2010, 2012, 2013
40+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
41+
TOOLSET: msvc-10.0,msvc-11.0,msvc-12.0
42+
- FLAVOR: cygwin (32-bit)
43+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
44+
ADDPATH: C:\cygwin\bin;
45+
B2_ADDRESS_MODEL: address-model=32
46+
# https://github.com/boostorg/test/issues/144
47+
DEFINES: define=_POSIX_C_SOURCE=200112L
48+
TOOLSET: gcc
49+
- FLAVOR: cygwin (64-bit)
50+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
51+
ADDPATH: C:\cygwin64\bin;
52+
B2_ADDRESS_MODEL: address-model=64
53+
# https://github.com/boostorg/test/issues/144
54+
DEFINES: define=_POSIX_C_SOURCE=200112L
55+
TOOLSET: gcc
56+
- FLAVOR: mingw32
57+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
58+
ARCH: i686
59+
B2_ADDRESS_MODEL: address-model=32
60+
SCRIPT: ci\mingw.bat
61+
- FLAVOR: mingw64
62+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
63+
ARCH: x86_64
64+
B2_ADDRESS_MODEL: address-model=64
65+
SCRIPT: ci\mingw.bat
66+
67+
install:
68+
- set SELF=%APPVEYOR_PROJECT_SLUG:-=_%
69+
- cd ..
70+
- git clone -b %APPVEYOR_REPO_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
71+
- cd boost-root
72+
- git submodule update -q --init tools/boostdep
73+
- git submodule update -q --init tools/build
74+
- git submodule update -q --init tools/inspect
75+
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\%SELF%
76+
- python tools/boostdep/depinst/depinst.py --include example %SELF%
77+
- cmd /c bootstrap
78+
- b2 headers
79+
80+
build: off
81+
82+
test_script:
83+
- set SELF=%APPVEYOR_PROJECT_SLUG:-=_%
84+
- PATH=%ADDPATH%%PATH%
85+
- IF DEFINED SCRIPT (call libs\%SELF%\%SCRIPT%) ELSE (b2 libs/%SELF% toolset=%TOOLSET% cxxstd=%CXXSTD% %CXXFLAGS% %DEFINES% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3)

‎ci/build.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#! /bin/bash
2+
#
3+
# Copyright 2017 James E. King III
4+
# Distributed under the Boost Software License, Version 1.0.
5+
# (See accompanying file LICENSE_1_0.txt or copy at
6+
# http://www.boost.org/LICENSE_1_0.txt)
7+
#
8+
# Bash script to run in travis to perform a bjam build
9+
# cwd should be $BOOST_ROOT/libs/$SELF before running
10+
#
11+
12+
set -ex
13+
14+
# default language level: c++03
15+
if [[ -z "$CXXSTD" ]]; then
16+
CXXSTD=03
17+
fi
18+
19+
$BOOST_ROOT/b2 . toolset=$TOOLSET cxxstd=$CXXSTD $CXXFLAGS $DEFINES $LINKFLAGS $TESTFLAGS $B2_ADDRESS_MODEL $B2_LINK $B2_THREADING $B2_VARIANT -j3 $*

‎ci/codecov.sh

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#! /bin/bash
2+
#
3+
# Copyright 2017, 2018 James E. King III
4+
# Distributed under the Boost Software License, Version 1.0.
5+
# (See accompanying file LICENSE_1_0.txt or copy at
6+
# http://www.boost.org/LICENSE_1_0.txt)
7+
#
8+
# Bash script to run in travis to perform codecov.io integration
9+
#
10+
11+
###
12+
### NOTE: Make sure you grab .codecov.yml
13+
###
14+
15+
# assumes cwd is the top level directory of the boost project
16+
# assumes an environment variable $SELF is the boost project name
17+
18+
set -ex
19+
20+
B2_VARIANT=debug
21+
ci/build.sh cxxflags=-fprofile-arcs cxxflags=-ftest-coverage linkflags=-fprofile-arcs linkflags=-ftest-coverage
22+
23+
# switch back to the original source code directory
24+
cd $TRAVIS_BUILD_DIR
25+
26+
# get the version of lcov
27+
lcov --version
28+
29+
# coverage files are in ../../b2 from this location
30+
lcov --gcov-tool=gcov-7 --rc lcov_branch_coverage=1 --base-directory "$BOOST_ROOT/libs/$SELF" --directory "$BOOST_ROOT" --capture --output-file all.info
31+
32+
# all.info contains all the coverage info for all projects - limit to ours
33+
lcov --gcov-tool=gcov-7 --rc lcov_branch_coverage=1 --extract all.info "*/boost/$SELF/*" "*/libs/$SELF/src/*" --output-file coverage.info
34+
35+
# dump a summary on the console - helps us identify problems in pathing
36+
lcov --gcov-tool=gcov-7 --rc lcov_branch_coverage=1 --list coverage.info
37+
38+
#
39+
# upload to codecov.io
40+
#
41+
curl -s https://codecov.io/bash > .codecov
42+
chmod +x .codecov
43+
./.codecov -f coverage.info -X gcov -x "gcov-7"

‎ci/coverity.sh

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#! /bin/bash
2+
#
3+
# Copyright 2017 James E. King III
4+
# Distributed under the Boost Software License, Version 1.0.
5+
# (See accompanying file LICENSE_1_0.txt or copy at
6+
# http://www.boost.org/LICENSE_1_0.txt)
7+
#
8+
# Bash script to run in travis to perform a Coverity Scan build
9+
# To skip the coverity integration download (which is huge) if
10+
# you already have it from a previous run, add --skipdownload
11+
#
12+
13+
#
14+
# Environment Variables
15+
#
16+
# COVERITY_SCAN_NOTIFICATION_EMAIL - email address to notify
17+
# COVERITY_SCAN_TOKEN - the Coverity Scan token (should be secure)
18+
# SELF - the boost libs directory name
19+
20+
set -ex
21+
22+
pushd /tmp
23+
if [[ "$1" != "--skipdownload" ]]; then
24+
rm -rf coverity_tool.tgz cov-analysis*
25+
wget https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=boostorg/$SELF" -O coverity_tool.tgz
26+
tar xzf coverity_tool.tgz
27+
fi
28+
COVBIN=$(echo $(pwd)/cov-analysis*/bin)
29+
export PATH=$COVBIN:$PATH
30+
popd
31+
32+
ci/build.sh clean
33+
rm -rf cov-int/
34+
cov-build --dir cov-int ci/build.sh
35+
tar cJf cov-int.tar.xz cov-int/
36+
curl --form token="$COVERITY_SCAN_TOKEN" \
37+
--form email="$COVERITY_SCAN_NOTIFICATION_EMAIL" \
38+
--form file=@cov-int.tar.xz \
39+
--form version="$(git describe --tags)" \
40+
--form description="boostorg/$SELF" \
41+
https://scan.coverity.com/builds?project="boostorg/$SELF"
42+

‎ci/cppcheck.sh

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#! /bin/bash
2+
#
3+
# Copyright 2018 James E. King III
4+
# Distributed under the Boost Software License, Version 1.0.
5+
# (See accompanying file LICENSE_1_0.txt or copy at
6+
# http://www.boost.org/LICENSE_1_0.txt)
7+
#
8+
# Bash script to run in travis to perform a cppcheck
9+
# cwd should be $BOOST_ROOT before running
10+
#
11+
12+
set -ex
13+
14+
# default language level: c++03
15+
if [[ -z "$CXXSTD" ]]; then
16+
CXXSTD=03
17+
fi
18+
19+
# Travis' ubuntu-trusty comes with cppcheck 1.62 which is pretty old
20+
# default cppcheck version: 1.82
21+
if [[ -z "$CPPCHKVER" ]]; then
22+
CPPCHKVER=1.82
23+
fi
24+
25+
pushd ~
26+
wget https://github.com/danmar/cppcheck/archive/$CPPCHKVER.tar.gz
27+
tar xzf $CPPCHKVER.tar.gz
28+
mkdir cppcheck-build
29+
cd cppcheck-build
30+
cmake ../cppcheck-$CPPCHKVER -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=~/cppcheck
31+
make -j3 install
32+
popd
33+
34+
~/cppcheck/bin/cppcheck -I. --std=c++$CXXSTD --enable=all --error-exitcode=1 \
35+
--force --check-config --suppress=*:boost/preprocessor/tuple/size.hpp \
36+
-UBOOST_USER_CONFIG -UBOOST_COMPILER_CONFIG -UBOOST_STDLIB_CONFIG -UBOOST_PLATFORM_CONFIG \
37+
libs/$SELF 2>&1 | grep -v 'Cppcheck does not need standard library headers'
38+

‎ci/mingw.bat

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
::
2+
:: MinGW Build Script for Appveyor, leveraging the MSYS2 installation
3+
:: Copyright (C) 2018 James E. King III
4+
:: Distributed under the Boost Software License, Version 1.0.
5+
:: (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
6+
::
7+
8+
@ECHO ON
9+
SETLOCAL EnableDelayedExpansion
10+
11+
:: Set up the toolset
12+
echo using gcc : %FLAVOR% : %ARCH%-w64-mingw32-g++.exe ; > %USERPROFILE%\user-config.jam
13+
SET UPPERFLAVOR=%FLAVOR%
14+
CALL :TOUPPER UPPERFLAVOR
15+
16+
:: Install packages needed to build boost
17+
:: Optional: comment out ones this library does not need,
18+
:: so people can copy this script to another library.
19+
20+
FOR %%a IN ("gcc" "icu" "libiconv" "openssl" "xz" "zlib") DO (
21+
c:\msys64\usr\bin\env MSYSTEM=%UPPERFLAVOR% c:\msys64\usr\bin\bash -l -c ^
22+
"pacman --sync --needed --noconfirm %FLAVOR%/mingw-w64-%ARCH%-%%a" || EXIT /B
23+
)
24+
c:\msys64\usr\bin\env MSYSTEM=%UPPERFLAVOR% c:\msys64\usr\bin\bash -l -c ^
25+
"pacman --sync --needed --noconfirm python3" || EXIT /B
26+
27+
::
28+
:: Now build things...
29+
::
30+
31+
c:\msys64\usr\bin\env MSYSTEM=%UPPERFLAVOR% c:\msys64\usr\bin\bash -l -c ^
32+
"cd %CD:\=/% && ./bootstrap.sh --with-toolset=gcc" || EXIT /B
33+
34+
c:\msys64\usr\bin\env MSYSTEM=%UPPERFLAVOR% c:\msys64\usr\bin\bash -l -c ^
35+
"cd %CD:\=/% && ./b2 libs/%SELF% toolset=gcc-%FLAVOR% cxxstd=%CXXSTD% %CXXFLAGS% %DEFINES% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3" || EXIT /B
36+
37+
EXIT /B 0
38+
39+
::
40+
:: Function to uppercase a variable
41+
:: from: https://stackoverflow.com/questions/34713621/batch-converting-variable-to-uppercase
42+
::
43+
44+
:TOUPPER <variable>
45+
@ECHO OFF
46+
FOR %%a IN ("a=A" "b=B" "c=C" "d=D" "e=E" "f=F" "g=G" "h=H" "i=I"
47+
"j=J" "k=K" "l=L" "m=M" "n=N" "o=O" "p=P" "q=Q" "r=R"
48+
"s=S" "t=T" "u=U" "v=V" "w=W" "x=X" "y=Y" "z=Z" ) DO ( CALL SET %~1=%%%~1:%%~a%% )
49+
@ECHO ON
50+
GOTO :EOF

‎example/Jamfile.v2

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Boost.PropertyMap Library example Jamfile
2+
#
3+
# Copyright (c) 2018 James E. King III
4+
#
5+
# Distributed under the Boost Software License, Version 1.0. (See accompany-
6+
# ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7+
8+
import testing ;
9+
10+
test-suite "property_map-examples"
11+
: [ run compose_property_map_example.cpp ]
12+
[ run example1.cpp ]
13+
[ run example2.cpp ]
14+
[ run example3.cpp ]
15+
;
16+

‎test/Jamfile.v2

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Function library
1+
# PropertyMap library
22

33
# Copyright (C) 2005 Trustees of Indiana University
44
#
@@ -10,6 +10,13 @@
1010

1111
# For more information, see http://www.boost.org/
1212

13+
import os ;
14+
15+
project
16+
: requirements
17+
<target-os>cygwin:<define>_POSIX_C_SOURCE=201112L
18+
;
19+
1320
test-suite property_map
1421
: [ compile property_map_cc.cpp ]
1522
[ run compose_property_map_test.cpp ]

0 commit comments

Comments
 (0)
Please sign in to comment.