Compare commits

..
245 changed files with 7664 additions and 2455 deletions
-16
View File
@@ -1,16 +0,0 @@
version: 2
jobs:
build:
docker:
- image: cppalliance/boost_superproject_build:20.04-v2
parallelism: 2
steps:
- checkout
- run: wget "https://raw.githubusercontent.com/boostorg/release-tools/develop/ci_boost_common.py" -P ${HOME}
- run: wget "https://raw.githubusercontent.com/boostorg/release-tools/develop/ci_boost_release.py" -P ${HOME}
- run: python3 ${HOME}/ci_boost_release.py checkout_post
# - run: python3 ${HOME}/ci_boost_release.py dependencies_override
- run: '[ "$CIRCLE_NODE_INDEX" != "0" ] || EOL=LF python3 ${HOME}/ci_boost_release.py test_pre'
- run: '[ "$CIRCLE_NODE_INDEX" != "1" ] || EOL=CRLF python3 ${HOME}/ci_boost_release.py test_pre'
- run: '[ "$CIRCLE_NODE_INDEX" != "0" ] || EOL=LF python3 ${HOME}/ci_boost_release.py test_override'
- run: '[ "$CIRCLE_NODE_INDEX" != "1" ] || EOL=CRLF python3 ${HOME}/ci_boost_release.py test_override'
-202
View File
@@ -1,202 +0,0 @@
name: CI
on:
push:
branches:
- feature/**
tags:
- '**'
jobs:
b2-posix:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
- os: macos-11
- os: macos-12
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Boost
run: |
./bootstrap.sh
./b2 -d0 headers
- name: Build Boost
run: |
./b2 -j3 stage
- name: Install Boost
run: |
./b2 -j3 --prefix=$HOME/.local install
- name: Test Boost
run: |
cd status
../b2 -j3 quick
b2-windows:
strategy:
fail-fast: false
matrix:
include:
- os: windows-2019
- os: windows-2022
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Boost
shell: cmd
run: |
cmd /c bootstrap
b2 -d0 headers
- name: Build Boost
run: |
./b2 -j3 stage
- name: Install Boost
run: |
./b2 -j3 install
- name: Test Boost
run: |
cd status
../b2 -j3 quick
cmake-install-posix:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
- os: macos-11
- os: macos-12
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Configure Boost
run: |
mkdir __build__ && cd __build__
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=~/.local ..
- name: Build Boost
run: |
cd __build__
cmake --build . -j 3
- name: Install Boost
run: |
cd __build__
cmake --build . -j 3 --target install
cmake-install-windows:
strategy:
fail-fast: false
matrix:
include:
- os: windows-2019
- os: windows-2022
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Configure Boost
run: |
mkdir __build__ && cd __build__
cmake -DBUILD_SHARED_LIBS=ON ..
- name: Build Boost
run: |
cd __build__
cmake --build . -j 3
- name: Install Boost
run: |
cd __build__
cmake --build . -j 3 --target install
cmake-test-posix:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
- os: macos-11
- os: macos-12
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Configure Boost
run: |
mkdir __build__ && cd __build__
cmake -DBUILD_TESTING=ON ..
- name: Build tests
run: |
cd __build__
cmake --build . -j 3 --target tests
- name: Run tests
run: |
cd __build__
ctest --output-on-failure --no-tests=error -j 3 -R quick
cmake-test-windows:
strategy:
fail-fast: false
matrix:
include:
- os: windows-2019
- os: windows-2022
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Configure Boost
run: |
mkdir __build__ && cd __build__
cmake -DBUILD_TESTING=ON -DBOOST_EXCLUDE_LIBRARIES="convert;outcome" ..
- name: Build tests
run: |
cd __build__
cmake --build . -j 3 --target tests
- name: Run tests
run: |
cd __build__
ctest --output-on-failure --no-tests=error -j 3 -R quick -C Debug
-60
View File
@@ -1,60 +0,0 @@
name: Release
on:
push:
tags:
- boost-*
jobs:
release-posix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: ${{ github.ref_name }}
submodules: true
- name: Cleanup
shell: bash
run: |
find ${{ github.ref_name }} -name ".git" -prune -exec rm -rf {} +
- name: Create archives
run: |
tar -czf ${{ github.ref_name }}.tar.gz ${{ github.ref_name }}
tar -cJf ${{ github.ref_name }}.tar.xz ${{ github.ref_name }}
- uses: softprops/action-gh-release@v1
with:
files: |
${{ github.ref_name }}.tar.gz
${{ github.ref_name }}.tar.xz
release-windows:
runs-on: windows-latest
needs: release-posix
steps:
- uses: actions/checkout@v3
with:
path: ${{ github.ref_name }}
submodules: true
- name: Cleanup
shell: bash
run: |
find ${{ github.ref_name }} -name ".git" -prune -exec rm -rf {} +
- name: Create archives
shell: cmd
run: |
7z a ${{ github.ref_name }}.zip ${{ github.ref_name }}
7z a ${{ github.ref_name }}.7z ${{ github.ref_name }}
- uses: softprops/action-gh-release@v1
with:
files: |
${{ github.ref_name }}.zip
${{ github.ref_name }}.7z
-1
View File
@@ -8,7 +8,6 @@
/dist
/project-config.jam*
/stage
/stage_x64/
/user-config.jam
/.settings/
/.project
+404 -674
View File
File diff suppressed because it is too large Load Diff
+39 -104
View File
@@ -3,22 +3,35 @@
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
# Copyright Rene Rivera 2015-2016.
# Copyright Peter Dimov 2017-2021.
branches:
only:
- master
- develop
- /feature\/.*/
dist: bionic
dist: trusty
language: cpp
language: c
compiler: gcc
compiler:
- gcc
git:
submodules: false
addons:
apt:
packages:
- p7zip-full
- docutils-common
- docutils-doc
- docbook
- docbook-xml
- docbook-xsl
- xsltproc
- doxygen
- dvipsk-ja
- texlive
- sshpass
- ghostscript
ssh_known_hosts: frs.sourceforge.net
env:
matrix:
@@ -29,108 +42,30 @@ matrix:
- env: TRAVIS_EMPTY_JOB_WORKAROUND=true
include:
- env: SCRIPT=ci_boost_release MODE=check
addons:
apt:
packages:
- xsltproc
# Simple integrated status tests check.
- env: SCRIPT=ci_boost_status
- env:
- SCRIPT=ci_boost_status
# Build release package for LF end-of-line style text files.
- env:
- SCRIPT=ci_boost_release
- EOL=LF
# Build release package for CRLF end-of-line style text files (i.e. for Windows).
- env:
- SCRIPT=ci_boost_release
- EOL=CRLF
# Library requirements tests.
- env:
- SCRIPT=ci_boost_library_check
# Same, but using release layout
- env: SCRIPT=ci_boost_status RELEASE=1
# Run 'quick' tests.
- env: SCRIPT=ci_boost_status TARGET=quick TOOLSET=gcc CXXSTD=03,11,14
compiler: g++
- env: SCRIPT=ci_boost_status TARGET=quick TOOLSET=clang CXXSTD=03,11,14
compiler: clang++
# Build Boost
- env: SCRIPT=ci_boost_build TOOLSET=gcc
compiler: g++
# Build Boost with release layout
- env: SCRIPT=ci_boost_build TOOLSET=gcc RELEASE=1
compiler: g++
# Build Boost with CMake
- env: CMAKE_BUILD=1
dist: xenial
compiler: g++
before_script: true
before_install: true
after_success: true
after_failure: true
after_script: true
addons:
apt:
packages:
- libzstd-dev
install:
- git submodule update --init --jobs 3
script:
- mkdir __build && cd __build
- cmake -DBOOST_INSTALL_LAYOUT=tagged -DBUILD_SHARED_LIBS=ON ..
- cmake --build .
# Install Boost with CMake
- env: CMAKE_INSTALL=1
compiler: g++
before_script: true
before_install: true
after_success: true
after_failure: true
after_script: true
install:
- pip install --user cmake
- git submodule update --init --jobs 3
script:
- mkdir __build && cd __build
- cmake -DBOOST_INSTALL_LAYOUT=tagged -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=~/.local ..
- cmake --build .
- cmake --build . --target install
# Test Boost with CMake
- env: CMAKE_TEST=1
dist: bionic
compiler: g++
before_script: true
before_install: true
after_success: true
after_failure: true
after_script: true
addons:
apt:
packages:
- liblzma-dev
- libzstd-dev
install:
- git submodule update --init --jobs 3
script:
- mkdir __build && cd __build
- cmake -DBUILD_TESTING=ON ..
- cmake --build . -j 3
- cmake --build . --target tests -j 3 -- -k
- ctest --output-on-failure -j 3 -R quick
allow_failures:
- env:
- SCRIPT=ci_boost_library_check
before_install:
# Fetch the scripts to do the actual building/testing.
- git submodule update --init --jobs 3
- |
wget "https://raw.githubusercontent.com/boostorg/release-tools/develop/ci_boost_common.py" -P ..
wget "https://raw.githubusercontent.com/boostorg/release-tools/develop/${SCRIPT}.py" -P ..
-20
View File
@@ -1,20 +0,0 @@
# Copyright 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.16)
# The default build type must be set before project()
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR AND NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
project(Boost VERSION 1.84.0 LANGUAGES CXX)
set(BOOST_SUPERPROJECT_VERSION ${PROJECT_VERSION})
set(BOOST_SUPERPROJECT_SOURCE_DIR ${PROJECT_SOURCE_DIR})
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/tools/cmake/include)
include(BoostRoot)
+46 -39
View File
@@ -19,28 +19,23 @@
# ======= configured locations (below).
#
# --prefix=<PREFIX> Install architecture independent files here.
# Default: C:\Boost on Windows
# Default: /usr/local on Unix, Linux, etc.
# Default; C:\Boost on Win32
# Default; /usr/local on Unix. Linux, etc.
#
# --exec-prefix=<EPREFIX> Install architecture dependent files here.
# Default: <PREFIX>
# Default; <PREFIX>
#
# --libdir=<LIBDIR> Install library files here.
# Default: <EPREFIX>/lib
# --libdir=<DIR> Install library files here.
# Default; <EPREFIX>/lib
#
# --includedir=<HDRDIR> Install header files here.
# Default: <PREFIX>/include
#
# --cmakedir=<CMAKEDIR> Install CMake configuration files here.
# Default: <LIBDIR>/cmake
#
# --no-cmake-config Do not install CMake configuration files.
# Default; <PREFIX>/include
#
# stage Build and install only compiled library files to the
# ===== stage directory.
#
# --stagedir=<STAGEDIR> Install library files here
# Default: ./stage
# Default; ./stage
#
# Other Options:
#
@@ -138,18 +133,11 @@ import notfile ;
import virtual-target ;
import "class" : new ;
import property-set ;
import threadapi-feature ;
import option ;
# Backslash because of `bcp --namespace`
import tools/boost\_install/boost-install ;
path-constant BOOST_ROOT : . ;
constant BOOST_VERSION : 1.84.0 ;
constant BOOST_VERSION : 1.65.0 ;
constant BOOST_JAMROOT_MODULE : $(__name__) ;
# Allow subprojects to simply `import config : requires ;` to get access to the requires rule
modules.poke : BOOST_BUILD_PATH : $(BOOST_ROOT)/libs/config/checks [ modules.peek : BOOST_BUILD_PATH ] ;
boostcpp.set-version $(BOOST_VERSION) ;
use-project /boost/architecture : libs/config/checks/architecture ;
@@ -185,11 +173,7 @@ project boost
<toolset>como-linux:<define>_GNU_SOURCE=1
# When building docs within Boost, we want the standard Boost style
<xsl:param>boost.defaults=Boost
<conditional>@threadapi-feature.detect
: usage-requirements <include>.
: default-build
<visibility>hidden
<threading>multi
: build-dir bin.v2
;
@@ -213,15 +197,18 @@ rule handle-static-runtime ( properties * )
# dangerous on Windows. Therefore, we disallow it. This might be drastic,
# but it was disabled for a while without anybody complaining.
local argv = [ modules.peek : ARGV ] ;
if <link>shared in $(properties)
&& <runtime-link>static in $(properties)
# For CW, static runtime is needed so that std::locale works.
&& ! ( <toolset>cw in $(properties) )
&& ! --allow-shared-static in $(argv)
# For CW, static runtime is needed so that std::locale works.
if <link>shared in $(properties) && <runtime-link>static in $(properties) &&
! ( <toolset>cw in $(properties) )
{
boostcpp.emit-shared-static-warning ;
if ! $(.shared-static-warning-emitted)
{
ECHO "warning: skipping configuration link=shared, runtime-link=static" ;
ECHO "warning: this combination is either impossible or too dangerous" ;
ECHO "warning: to be of any use" ;
.shared-static-warning-emitted = 1 ;
}
return <build>no ;
}
}
@@ -247,11 +234,12 @@ local rule explicit-alias ( id : targets + )
explicit-alias prg_exec_monitor : libs/test/build//boost_prg_exec_monitor ;
explicit-alias test_exec_monitor : libs/test/build//boost_test_exec_monitor ;
explicit-alias unit_test_framework : libs/test/build//boost_unit_test_framework ;
explicit-alias bgl-vis : libs/graps/build//bgl-vis ;
explicit-alias serialization : libs/serialization/build//boost_serialization ;
explicit-alias wserialization : libs/serialization/build//boost_wserialization ;
for local l in $(all-libraries)
{
if ! $(l) in test graph serialization headers
if ! $(l) in test graph serialization
{
explicit-alias $(l) : libs/$(l)/build//boost_$(l) ;
}
@@ -293,26 +281,37 @@ if [ path.exists $(BOOST_ROOT)/libs/wave/tool/build ]
use-project /boost/libs/wave/tool : libs/wave/tool/build ;
}
# Make the boost-install rule visible in subprojects
# This rule should be called from libraries' Jamfiles and will create two
# targets, "install" and "stage", that will install or stage that library. The
# --prefix option is respected, but --with and --without options, naturally, are
# ignored.
#
# - libraries -- list of library targets to install.
#
rule boost-install ( libraries * )
{
boost-install.boost-install $(libraries) ;
package.install install
: <dependency>/boost//install-proper-headers $(install-requirements)
: # No binaries
: $(libraries)
: # No headers, it is handled by the dependency.
;
install stage : $(libraries) : <location>$(BOOST_STAGE_LOCATE) ;
module [ CALLER_MODULE ]
{
explicit stage ;
explicit install ;
}
}
# Creates a library target, adding autolink support and also creates
# stage and install targets via boost-install, above.
rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * )
{
autolink = <link>shared:<define>BOOST_$(name:U)_DYN_LINK=1 ;
name = boost_$(name) ;
autolink = <link>shared:<define>$(name:U)_DYN_LINK=1 ;
lib $(name)
: $(sources)
: $(requirements) $(autolink)
@@ -323,6 +322,14 @@ rule boost-lib ( name : sources * : requirements * : default-build * : usage-req
}
headers =
# The .SUNWCCh files are present in tr1 include directory and have to be
# installed (see http://lists.boost.org/Archives/boost/2007/05/121430.php).
[ path.glob-tree $(BOOST_ROOT)/boost : *.hpp *.ipp *.h *.inc *.SUNWCCh : CVS .svn ]
[ path.glob-tree $(BOOST_ROOT)/boost/compatibility/cpp_c_headers : c* : CVS .svn ]
[ path.glob boost/tr1/tr1 : * : bcc32 sun CVS .svn ]
;
# Declare special top-level targets that build and install the desired variants
# of the libraries.
boostcpp.declare-targets $(all-libraries) ;
boostcpp.declare-targets $(all-libraries) : $(headers) ;
-46
View File
@@ -1,46 +0,0 @@
# Boost C++ Libraries
The Boost project provides free peer-reviewed portable C++ source libraries.
We emphasize libraries that work well with the C++ Standard Library. Boost
libraries are intended to be widely useful, and usable across a broad spectrum
of applications. The Boost license encourages both commercial and non-commercial use
and does not require attribution for binary use.
The project website is www.boost.org, where you can obtain more information and
[download](https://www.boost.org/users/download/) the current release.
## Cloning
Clone the superproject repository with all submodules and checkout the `master` as the default branch:
```console
git clone --recurse-submodules https://github.com/boostorg/boost.git boost-root
```
or checkout the `develop` branch with the latest development snapshot:
```console
git clone --branch develop --recurse-submodules https://github.com/boostorg/boost.git boost-root
```
Alternatively, clone just the superproject repository, then clone a desired submodule together with its dependencies:
```console
git clone https://github.com/boostorg/boost.git boost-root
cd boost-root
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py filesystem
```
Alternatively, clone just the superproject repository, then manually pick individual submodules:
```console
git clone https://github.com/boostorg/boost.git boost-root
cd boost-root
git submodule --quiet update --init \
tools/build \
tools/boost_install \
tools/boostdep \
libs/headers
```
+6 -11
View File
@@ -1,21 +1,16 @@
version: 1.0.{build}-{branch}
branches:
only:
- develop
- master
image:
- Visual Studio 2017
- Visual Studio 2015
- Visual Studio 2013
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
SCRIPT: ci_boost_test_library
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
SCRIPT: ci_boost_test_library
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
SCRIPT: ci_boost_test_library
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
SCRIPT: ci_boost_status
TARGET: quick
- SCRIPT: ci_boost_status
init:
- cd %APPVEYOR_BUILD_FOLDER%/..
+1 -1
View File
@@ -9,7 +9,7 @@
# folder. It allows us to choose which Boost Build installation to use for
# building Boost libraries. Unless explicitly selected using a command-line
# option, the version included with the Boost library distribution is used (as
# opposed to any other Boost Build version installed on the user's system).
# opposed to any other Boost Build version installed on the user's sytem).
BOOST_ROOT = $(.boost-build-file:D) ;
BOOST_BUILD = [ MATCH --boost-build=(.*) : $(ARGV) ] ;
+245 -214
View File
@@ -20,12 +20,10 @@ import package ;
import path ;
import project ;
import regex ;
import sequence ;
import set ;
import targets ;
import feature ;
import property ;
import version : version-less ;
##############################################################################
#
@@ -40,8 +38,8 @@ rule set-version ( version )
{
BOOST_VERSION = $(version) ;
local version-tag =
[ MATCH "^([^.]+)[.]([^.]+)[.]([^.]+)" : $(BOOST_VERSION) ] ;
local version-tag = [ MATCH ^([^.]+)[.]([^.]+)[.]([^.]+) : $(BOOST_VERSION)
] ;
if $(version-tag[3]) = 0
{
version-tag = $(version-tag[1-2]) ;
@@ -60,23 +58,6 @@ if ! ( $(build-type) in complete minimal )
# What kind of layout are we doing?
layout = [ option.get layout : "" ] ;
layout = [ MATCH (versioned|tagged|system)(-(.+))? : $(layout) ] ;
if $(layout[3])
{
layout-version = $(layout[3]) ;
layout = $(layout[1]) ;
if [ version-less [ regex.split $(layout-version) "[.]" ] : 1 66 ]
{
layout-version = 1.40 ;
}
else if [ version-less [ regex.split $(layout-version) "[.]" ] : 1 69 ]
{
layout-version = 1.66 ;
}
}
layout-version ?= 1.69 ;
# On Windows, we used versioned layout by default in order to be compatible with
# autolink. On other systems, we use system layout which is what every other
# program uses. Note that the Windows check is static, and will not be affected
@@ -96,12 +77,12 @@ layout-$(layout) = true ;
if $(layout) = system && $(build-type) = complete
{
ECHO error\: Cannot use --layout=system with --build-type complete. ;
ECHO error\: Please use either --layout=versioned or --layout=tagged ;
ECHO error\: if you wish to build multiple variants. ;
ECHO error: Cannot use --layout=system with --build-type complete. ;
ECHO error: Please use either --layout=versioned or --layout=tagged ;
ECHO error: if you wish to build multiple variants. ;
if [ os.name ] != NT
{
ECHO error\: Note that --layout=system is used by default on Unix
ECHO error: Note that --layout=system is used by default on Unix
starting with Boost 1.40. ;
}
EXIT ;
@@ -109,16 +90,7 @@ if $(layout) = system && $(build-type) = complete
# Possible stage only location.
stage-locate = [ option.get stagedir ] ;
if $(stage-locate)
{
stage-locate = [ path.root [ path.make $(stage-locate) ] [ path.pwd ] ] ;
}
else
{
stage-locate = $(BOOST_ROOT)/stage ;
}
stage-locate ?= stage ;
BOOST_STAGE_LOCATE = $(stage-locate) ;
# Custom build ID.
@@ -132,47 +104,7 @@ if $(build-id)
python-id = [ option.get "python-buildid" ] ;
if $(python-id)
{
PYTHON_ID = [ regex.replace $(python-id) "[*\\/:.\"\']" _ ] ;
}
if $(layout) = versioned
{
switch $(layout-version)
{
case 1.40 :
.format-name-args =
<base> <toolset> <threading> <runtime> ;
case 1.66 :
.format-name-args =
<base> <toolset> <threading> <runtime> <arch-and-model> ;
case 1.69 :
.format-name-args =
<base> <toolset> <threading> <runtime> <arch-and-model> ;
}
}
else if $(layout) = tagged
{
switch $(layout-version)
{
case 1.40 :
.format-name-args =
<base> <threading> <runtime> ;
case 1.66 :
.format-name-args =
<base> <threading> <runtime> ;
case 1.69 :
.format-name-args =
<base> <threading> <runtime> <arch-and-model> ;
}
}
else if $(layout) = system
{
.format-name-args = <base> ;
}
else
{
.format-name-error = true ;
PYTHON_ID = [ regex.replace $(python-id) [*\\/:.\"\'] _ ] ;
}
@@ -187,17 +119,31 @@ rule tag ( name : type ? : property-set )
{
if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
{
local args = $(.format-name-args) ;
local result ;
if $(layout) = versioned
{
args += -$(BOOST_VERSION_TAG) ;
result = [ common.format-name
<base> <toolset> <threading> <runtime> -$(BOOST_VERSION_TAG)
-$(BUILD_ID)
: $(name) : $(type) : $(property-set) ] ;
}
local result = [ common.format-name
$(args) -$(BUILD_ID)
: $(name) : $(type) : $(property-set) ] ;
if $(.format-name-error)
else if $(layout) = tagged
{
EXIT error\: invalid layout '$(layout:E=)' ;
result = [ common.format-name
<base> <threading> <runtime>
-$(BUILD_ID)
: $(name) : $(type) : $(property-set) ] ;
}
else if $(layout) = system
{
result = [ common.format-name
<base>
-$(BUILD_ID)
: $(name) : $(type) : $(property-set) ] ;
}
else
{
EXIT error: invalid layout '$(layout:E=)' ;
}
# Optionally add version suffix. On NT, library with version suffix will
@@ -206,10 +152,8 @@ rule tag ( name : type ? : property-set )
# version suffix is not needed -- the linker expects the
# libFoo.1.2.3.dylib format. AIX linkers do not accept version suffixes
# either. Pgi compilers can not accept a library with version suffix.
# For android, if we link to libFoo.so, which is a soft link to libFoo.so.1.2.3,
# the android studio will only pack the former into the final apk.
if $(type) = SHARED_LIB &&
! [ $(property-set).get <target-os> ] in windows cygwin darwin aix android &&
! [ $(property-set).get <target-os> ] in windows cygwin darwin aix &&
! [ $(property-set).get <toolset> ] in pgi
{
result = $(result).$(BOOST_VERSION) ;
@@ -224,27 +168,9 @@ rule tag ( name : type ? : property-set )
rule python-tag ( name : type ? : property-set )
{
local result = $(name) ;
if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB && $(PYTHON_ID)
{
# Add Python version suffix
local version = [ $(property-set).get <python> ] ;
local major-minor = [ MATCH "^([0-9]+)\.([0-9]+)" : $(version) ] ;
local suffix = $(major-minor:J="") ;
if $(suffix)
{
result = $(result)$(suffix) ;
}
# Add PYTHON_ID if supplied
if $(PYTHON_ID)
{
result = $(result)-$(PYTHON_ID) ;
}
result = $(result)-$(PYTHON_ID) ;
}
# forward to the boost tagging rule
@@ -257,18 +183,155 @@ rule python-tag ( name : type ? : property-set )
#
# - 'stage-proper' that puts all libraries in stage/lib
# - 'install-proper' that install libraries and headers to system location
# - 'stage-unversioned' that creates links to libraries without boost version
# in name
# - 'install-unversioned' which creates unversioned linked to installed
# libraries.
#
################################################################################
rule declare_install_and_stage_proper_targets ( libraries * )
# Worker function suitable to the 'generate' metatarget. Creates a link to
# 'source', striping any version number information from the name.
rule make-unversioned-links ( project name ? : property-set : sources * )
{
local filter ;
if [ modules.peek : NT ]
{
filter = (.*[.]lib) ;
}
else
{
filter =
(.*[.]so)[.0-9]*
(.*[.]dylib)
(.*[.]a) ;
}
local result ;
for local s in $(sources)
{
local m = [ MATCH ^(.*)-[0-9_]+$(filter)$ : [ $(s).name ] ] ;
if $(m)
{
local ea = [ $(s).action ] ;
local ep = [ $(ea).properties ] ;
local a = [ new non-scanning-action $(s) : symlink.ln : $(ep) ] ;
result += [ new file-target $(m:J=) exact : [ $(s).type ] :
$(project) : $(a) ] ;
}
}
return $(result) ;
}
rule filtered-target ( name : message + : sources + : requirements * )
{
message $(name)-message : warning: $(message) ;
alias $(name) : $(sources) : $(requirements) ;
alias $(name) : $(name)-message ;
local p = [ project.current ] ;
$(p).mark-target-as-explicit $(name) ;
$(p).mark-target-as-explicit $(name)-message ;
}
rule declare_install_and_stage_proper_targets ( libraries * : headers * )
{
local p = [ project.current ] ;
for local l in $(libraries)
{
if $(l) = locale
{
filtered-target $(l)-for-install :
Skipping Boost.Locale library with threading=single. :
libs/$(l)/build : <threading>multi ;
}
else if $(l) = wave
{
filtered-target $(l)-for-install :
Skipping Boost.Wave library with threading=single. :
libs/$(l)/build : <threading>multi ;
}
else if $(l) = thread
{
filtered-target $(l)-for-install :
Skipping Boost.Thread library with threading=single. :
libs/$(l)/build : <threading>multi ;
}
else
{
alias $(l)-for-install : libs/$(l)/build ;
$(p).mark-target-as-explicit $(l)-for-install ;
}
}
local library-targets = $(libraries)-for-install ;
alias install-proper : libs/$(libraries)/build//install ;
install-requirements = <install-source-root>$(BOOST_ROOT)/boost ;
if $(layout-versioned)
{
install-requirements +=
<install-header-subdir>boost-$(BOOST_VERSION_TAG)/boost ;
}
else
{
install-requirements += <install-header-subdir>boost ;
}
if [ os.name ] = NT
{
install-requirements += <install-default-prefix>C:/Boost ;
}
else
{
install-requirements += <install-default-prefix>/usr/local ;
}
p = [ project.current ] ;
# Complete install.
package.install install-proper
: $(install-requirements) <install-no-version-symlinks>on
:
: $(libraries)-for-install
: $(headers)
;
$(p).mark-target-as-explicit install-proper ;
alias stage-proper : libs/$(libraries)/build//stage ;
# Install just library.
install stage-proper
: $(libraries)-for-install
: <location>$(stage-locate)/lib
<install-dependencies>on <install-type>LIB
<install-no-version-symlinks>on
;
$(p).mark-target-as-explicit stage-proper ;
# Commented out as it does not seem to work. Whoever wrote this originally,
# left some typos in the code, but when that got corrected and the code got
# enabled - it started reporting ambiguous/duplicate target Boost Build
# errors. Anyone requiring unversioned staged libraries needs to correct
# those errors before reenabling this code. For more detailed information
# see the related Boost library development mailing list thread at
# 'http://lists.boost.org/Archives/boost/2012/06/194312.php'.
# (06.07.2012.) (Jurko)
#~ if $(layout-versioned) && ( [ modules.peek : NT ] || [ modules.peek : UNIX ] )
#~ {
#~ generate stage-unversioned : stage-proper :
#~ <generating-rule>@boostcpp.make-unversioned-links ;
#~ $(p).mark-target-as-explicit stage-unversioned ;
#~
#~ generate install-unversioned : install-proper :
#~ <generating-rule>@boostcpp.make-unversioned-links ;
#~ $(p).mark-target-as-explicit install-unversioned ;
#~ }
#~ else
{
# Create do-nothing aliases.
alias stage-unversioned ;
$(p).mark-target-as-explicit stage-unversioned ;
alias install-unversioned ;
$(p).mark-target-as-explicit install-unversioned ;
}
}
@@ -280,24 +343,9 @@ rule declare_install_and_stage_proper_targets ( libraries * )
#
################################################################################
rule emit-shared-static-warning ( )
{
if ! $(.shared-static-warning-emitted)
{
ECHO "" ;
ECHO "warning: The configuration link=shared, runtime-link=static is disabled" ;
ECHO "warning: by default as being too dangerous to use, and will not be built." ;
ECHO "warning: To enable it, use --allow-shared-static." ;
ECHO "" ;
.shared-static-warning-emitted = 1 ;
}
}
class top-level-target : alias-target-class
{
import modules ;
import boostcpp ;
rule __init__ ( name : project : sources * : requirements *
: default-build * : usage-requirements * )
@@ -311,116 +359,81 @@ class top-level-target : alias-target-class
# incompatibility between debug and release variants. We build shared
# and static libraries since that is what most packages seem to provide
# (.so in libfoo and .a in libfoo-dev).
self.minimal-properties = [ property-set.create <variant>release
<threading>multi <link>shared <link>static <runtime-link>shared ] ;
# On Windows, new IDE projects use:
#
# runtime-link=dynamic, threading=multi, variant=(debug|release)
#
# and in addition, C++ Boost's autolink defaults to static linking.
self.minimal-properties-win = [ property-set.create <variant>debug
<variant>release <threading>multi <link>static <runtime-link>shared
<address-model>32 <address-model>64 ] ;
] ;
self.complete-properties = [ property-set.create
<variant>debug <variant>release
<threading>multi
<link>shared <link>static
<runtime-link>shared <runtime-link>static ] ;
self.complete-properties-win = [ property-set.create
<variant>debug <variant>release
<threading>multi
<link>shared <link>static
<runtime-link>shared <runtime-link>static
<address-model>32 <address-model>64 ] ;
}
rule generate ( property-set )
{
modules.poke : top-level-targets : [ modules.peek : top-level-targets ]
$(self.name) ;
local os = [ $(property-set).get <target-os> ] ;
# Because we completely override the parent's 'generate' we need to
# check for default feature values ourselves.
if ! $(os)
{
os = [ feature.defaults <target-os> ] ;
os = $(os:G=) ;
}
local build-type-set ;
if $(self.build-type) = minimal
{
local expanded ;
local os = [ $(property-set).get <target-os> ] ;
# Because we completely override the parent's 'generate' we need to
# check for default feature values ourselves.
if ! $(os)
{
os = [ feature.defaults <target-os> ] ;
os = $(os:G=) ;
}
if $(os) = windows
{
build-type-set = $(self.minimal-properties-win) ;
expanded = [ targets.apply-default-build $(property-set)
: $(self.minimal-properties-win) ] ;
}
else
{
build-type-set = $(self.minimal-properties) ;
expanded = [ targets.apply-default-build $(property-set)
: $(self.minimal-properties) ] ;
}
return [ build-multiple $(expanded) ] ;
}
else if $(self.build-type) = complete
{
if $(os) = windows
{
build-type-set = $(self.complete-properties-win) ;
}
else
{
build-type-set = $(self.complete-properties) ;
}
}
else
{
import errors ;
errors.error "Unknown build type" ;
}
if $(build-type-set)
{
local expanded = [ targets.apply-default-build $(property-set)
: $(build-type-set) ] ;
# Filter inappropriate combinations.
: $(self.complete-properties) ] ;
# Filter inappopriate combinations.
local filtered ;
local skipped ;
local argv = [ modules.peek : ARGV ] ;
for local p in $(expanded)
{
# See comment in handle-static-runtime regarding this logic.
if [ $(p).get <link> ] = shared
&& [ $(p).get <runtime-link> ] = static
&& [ $(p).get <toolset> ] != cw
&& ! --allow-shared-static in $(argv)
{
# Skip this.
skipped += $(p) ;
}
else
{
filtered += $(p) ;
}
}
if $(expanded) = $(skipped)
{
boostcpp.emit-shared-static-warning ;
}
return [ build-multiple $(filtered) ] ;
}
else
{
import errors ;
errors.error "Unknown build type" ;
}
}
rule build-multiple ( property-sets * )
@@ -440,17 +453,17 @@ class top-level-target : alias-target-class
}
}
rule declare_top_level_targets ( libraries * )
rule declare_top_level_targets ( libraries * : headers * )
{
declare_install_and_stage_proper_targets $(libraries) ;
declare_install_and_stage_proper_targets $(libraries) : $(headers) ;
targets.create-metatarget top-level-target : [ project.current ]
: install
: install-proper
: install-proper install-unversioned
;
targets.create-metatarget top-level-target : [ project.current ]
: stage
: stage-proper headers
: stage-proper stage-unversioned
;
p = [ project.current ] ;
@@ -465,6 +478,9 @@ rule declare_top_level_targets ( libraries * )
}
stage-abs = [ path.native [ path.root $(stage-locate)/lib [ path.pwd ] ] ] ;
################################################################################
#
# 4. Add hook to report configuration before the build, and confirmation with
@@ -491,6 +507,7 @@ rule pre-build ( )
IMPORT $(__name__) : pre-build : : $(__name__).pre-build ;
build-system.set-pre-build-hook $(__name__).pre-build ;
# FIXME: Revise stage_abs.
rule post-build ( ok ? )
{
if forward in [ modules.peek : top-level-targets ]
@@ -498,8 +515,6 @@ rule post-build ( ok ? )
if $(ok)
{
local include-path = [ path.native $(BOOST_ROOT) ] ;
local stage-abs = [ path.native $(stage-locate)/lib ] ;
ECHO "
The Boost C++ Libraries were successfully built!
@@ -547,19 +562,19 @@ rule libraries-to-install ( existing-libs * )
# Do some checks.
if $(with-parameter) && $(without-parameter)
{
EXIT error\: both --with-<library> and --without-<library> specified ;
EXIT error: both --with-<library> and --without-<library> specified ;
}
local wrong = [ set.difference $(with-parameter) : $(existing-libs) ] ;
if $(wrong)
{
EXIT error\: wrong library name '$(wrong[1])' in the --with-<library>
EXIT error: wrong library name '$(wrong[1])' in the --with-<library>
option. ;
}
local wrong = [ set.difference $(without-parameter) : $(existing-libs) ] ;
if $(wrong)
{
EXIT error\: wrong library name '$(wrong[1])' in the --without-<library>
EXIT error: wrong library name '$(wrong[1])' in the --without-<library>
option. ;
}
@@ -573,7 +588,7 @@ rule libraries-to-install ( existing-libs * )
}
}
rule declare-targets ( all-libraries * )
rule declare-targets ( all-libraries * : headers * )
{
configure.register-components $(all-libraries) ;
@@ -583,7 +598,7 @@ rule declare-targets ( all-libraries * )
if [ option.get "show-libraries" : : true ]
{
ECHO The following libraries require building\: ;
ECHO The following libraries require building: ;
for local l in $(libraries)
{
ECHO " - $(l)" ;
@@ -591,7 +606,7 @@ rule declare-targets ( all-libraries * )
EXIT ;
}
declare_top_level_targets $(libraries) ;
declare_top_level_targets $(libraries) : $(headers) ;
}
# Returns the properties identifying the toolset. We'll use them
@@ -614,16 +629,20 @@ rule deduce-address-model ( properties * )
{
local result ;
local filtered = [ toolset-properties $(properties) ] ;
local names = 32 64 ;
local idx = [ configure.find-builds "default address-model" : $(filtered)
: /boost/architecture//32 "32-bit"
: /boost/architecture//64 "64-bit" ] ;
result = $(names[$(idx)]) ;
if [ configure.builds /boost/architecture//32 : $(filtered) : 32-bit ]
{
result = 32 ;
}
else if [ configure.builds /boost/architecture//64 : $(filtered) : 64-bit ]
{
result = 64 ;
}
if $(result)
{
# Normally, returning composite feature here is equivalent to forcing
# constituent properties as well. But we only want to indicate toolset
# consituent properties as well. But we only want to indicate toolset
# deduced default, so also pick whatever address-model is explicitly
# specified, if any.
result = <deduced-address-model>$(result) [ property.select <address-model> : $(properties) ] ;
@@ -636,7 +655,7 @@ rule address-model ( )
return <conditional>@boostcpp.deduce-address-model ;
}
local deducable-architectures = arm loongarch mips power riscv s390x sparc x86 combined ;
local deducable-architectures = arm mips1 power sparc x86 combined ;
feature.feature deduced-architecture : $(deducable-architectures) : propagated optional composite hidden ;
for a in $(deducable-architectures)
{
@@ -647,18 +666,30 @@ rule deduce-architecture ( properties * )
{
local result ;
local filtered = [ toolset-properties $(properties) ] ;
local names = arm loongarch mips power riscv s390x sparc x86 combined ;
local idx = [ configure.find-builds "default architecture" : $(filtered)
: /boost/architecture//arm
: /boost/architecture//loongarch
: /boost/architecture//mips
: /boost/architecture//power
: /boost/architecture//riscv
: /boost/architecture//s390x
: /boost/architecture//sparc
: /boost/architecture//x86
: /boost/architecture//combined ] ;
result = $(names[$(idx)]) ;
if [ configure.builds /boost/architecture//arm : $(filtered) : arm ]
{
result = arm ;
}
else if [ configure.builds /boost/architecture//mips1 : $(filtered) : mips1 ]
{
result = mips1 ;
}
else if [ configure.builds /boost/architecture//power : $(filtered) : power ]
{
result = power ;
}
else if [ configure.builds /boost/architecture//sparc : $(filtered) : sparc ]
{
result = sparc ;
}
else if [ configure.builds /boost/architecture//x86 : $(filtered) : x86 ]
{
result = x86 ;
}
else if [ configure.builds /boost/architecture//combined : $(filtered) : combined ]
{
result = combined ;
}
if $(result)
{
+459
View File
@@ -0,0 +1,459 @@
# Boost.Build support specific for the Boost C++ Libraries.
# Copyright Vladimir Prus 2002-2010.
# Copyright Dave Abrahams 2005-2006.
# Copyright Rene Rivera 2005-2007.
# Copyright Douglas Gregor 2005.
#
# 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)
import b2.util.option as option
import b2.build.feature as feature
import b2.build.virtual_target as virtual_target
import b2.build.targets as targets
import b2.build.property_set as property_set
import b2.build_system as build_system
import b2.build.configure as configure
import b2.tools.stage as stage
import b2.tools.package as package
import b2.util.regex as regex
import b2.util.set as set
from b2.build.alias import AliasTarget, alias
from b2.tools.message import message
from b2.manager import get_manager
from b2.util import bjam_signature, value_to_jam
from b2.util.sequence import unique
import sys
import os
# FIXME: temporary fix until I port the xsltproc module
feature.feature("xsl:param", [], ["free"])
##############################################################################
#
# 0. General setup. Parse options, check them.
#
##############################################################################
BOOST_ROOT = get_manager().projects().loaded_tool_module_path_[__name__]
print "HERE I AM"
@bjam_signature((["version"],))
def set_version(version):
global BOOST_VERSION, BOOST_VERSION_TAG
BOOST_VERSION = version
pieces = version.split(".")
if pieces[2] == "0":
pieces = pieces[0:2]
BOOST_VERSION_TAG = "_".join(pieces)
# Option to choose how many variants to build. The default is "minimal".
build_type = option.get("build-type", "minimal")
if not build_type in ["minimal", "complete"]:
get_manager().errors()("The value of the --build-type option should be either 'complete' or 'minimal'")
# What kind of layout are we doing?
layout = option.get("layout")
# On Windows, we used versioned layout by default in order to
# be compatible with autolink. On other systems, we use system
# layout which is what every other program uses. Note that windows
# check is static, and won't
if not layout:
if os.name == "nt":
layout = "versioned"
else:
layout = "system"
if layout == "system" and build_type == "complete":
get_manager().errors()(
"Cannot use --layout=system with --build-type complete.\n"
"Please used either --layout=versioned or --layout=tagged\n"
"if you wish to build multiple variants.")
# Possible stage only location.
stage_locate = option.get("stagedir", "stage")
BOOST_STAGE_LOCATE = stage_locate
# Custom build ID.
build_id = option.get("buildid")
if build_id:
BUILD_ID = re.sub("[*\\/:.\"\' ]", "_", build_id)
# Python build id (only for Python libraries)
python_id = option.get("python-buildid")
if python_id:
PYTHON_ID = re.sub("[*\\/:.\"\' ]", "_", python_id)
##############################################################################
#
# 1. The 'tag' function that adds decoration suitable to the properties if
# versioned or tagged layout is requested. This function is called from
# Jamroot
#
##############################################################################
def tag(name, type, ps):
if type in ["STATIC_LIB", "SHARED_LIB", "IMPORT_LIB"]:
pass
## FIXME
## if $(layout) = versioned
## {
## result = [ common.format-name
## <base> <toolset> <threading> <runtime> -$(BOOST_VERSION_TAG)
## -$(BUILD_ID)
## : $(name) : $(type) : $(property-set) ] ;
## }
## else if $(layout) = tagged
## {
## result = [ common.format-name
## <base> <threading> <runtime>
## -$(BUILD_ID)
## : $(name) : $(type) : $(property-set) ] ;
## }
## else if $(layout) = system
## {
## result = [ common.format-name
## <base>
## -$(BUILD_ID)
## : $(name) : $(type) : $(property-set) ] ;
## }
## else
## {
## ECHO "error: invalid layout '$(layout:E=)'" ;
## EXIT ;
## }
## # Optionally add version suffix. On NT, library with version suffix
## # will not be recognized by linkers. On CYGWIN, we get strage
## # duplicate symbol errors when library is generated with version
## # suffix. On OSX, version suffix is not needed -- the linker expects
## # the libFoo.1.2.3.dylib format. AIX linkers do not accept version
## # suffixes either. Pgi compilers can not accept library with version
## # suffix.
## if $(type) = SHARED_LIB &&
## ( ! ( [ $(property-set).get <target-os> ] in windows cygwin darwin aix ) &&
## ! ( [ $(property-set).get <toolset> ] in pgi ) )
## {
## result = $(result).$(BOOST_VERSION) ;
## }
## return $(result) ;
## }
##############################################################################
#
# 2. Declare targets that build and install all libraries. Specifically:
#
# - 'stage-proper' that puts all libraries in stage/lib
# - 'install-proper' that install libraries and headers to system location
# - 'stage-unversioned' that creates links to libraries without boost veriosn
# in name
# - 'install-unversioned' which creates unversioned linked to installed
# libraries.
#
##############################################################################
# Worker function suitable to the 'generate' metatarget. Creates a link
# to 'source', striping any version number from the name.
def make_unversioned_links(project, name, ps, sources):
result = []
filtered = []
nt = os.name == "nt"
# Collect the libraries that have the version number in 'filtered'.
for s in sources:
if nt:
m = s.name().endswith(".lib")
else:
m = re.match("(.*[.]so[.0-9]+)" "(.*[.]dylib)" "(.*[.]a)", s.name())
if m:
filtered.append(s)
# Create links without version.
for s in filtered:
a = virtual_target.NonScanningAction(s, "symlink.ln", s.action().properties())
name = s.name()
if nt:
m = re.match("(.*)-[0-9_]+(.*[.]lib)", name)
else:
m = re.match("(.*)-[0-9_]+(.*[.]so)[.0-9]*", name)
if not m:
m = re.match("(.*)-[0-9_]+(.*[.]dylib)", name)
if not m:
m = re.match("(.*)-[0-9_]+(.*[.]a)", name)
if not m:
m = re.match("(.*)-[0-9_]+(.*[.]dll[.]a)", name)
new_name = m.group(1) + m.group(2)
result.append(virtual_target.FileTarget(new_name, s.type(), project, a,
exact=True))
return result
def declare_install_and_stage_proper_targets(libraries, headers):
install_requirements = ["<install-source-root>" + BOOST_ROOT + "/boost"]
if layout == "versioned":
install_requirements.append("<install-header-subdir>boost-" + BOOST_VERSION_TAG + "/boost")
else:
install_requirements.append("<install-header-subdir>boost")
if os.name == "nt":
default_prefix = "C:/Boost"
else:
default_prefix = "/usr/local"
install_requirements.append("<install-default-prefix>" + default_prefix)
p = get_manager().projects().current()
package.install("install-proper",
install_requirements + ["<install-no-version-symlinks>on"],
[],
["libs/%s/build" % l for l in libraries],
headers)
p.mark_targets_as_explicit(["install-proper"])
stage.install("stage-proper",
["libs/%s/build" % l for l in libraries],
["<location>" + stage_locate + "/lib",
"<install-dependencies>on", "<install-type>LIB",
"<install-no-version-symlinks>on"])
p.mark_targets_as_explicit(["stage-proper"])
gr = value_to_jam(make_unversioned_links)
gr = "<generating-rule>" + gr
if layout == "versioned":
generate("stage-unversioned", ["stage-proper"], [gr])
generate("install-unversioned", ["install-proper"], [gr])
else:
# Create do-nothing aliases.
alias("stage-unversioned")
alias("install-unversioned")
p.mark_targets_as_explicit(["stage-unversioned", "install-unversioned"])
##############################################################################
#
# 3. Declare top-level targets 'stage' and 'install'. These examine
# the --build-type option and, in case it's 'complete', build the
# 'install-proper' and 'stage-proper' targets with a number of
# property sets.
#
##############################################################################
# The names of all top-level targets that were built.
top_level_targets = []
class TopLevelTarget(AliasTarget):
def __init__(self, name, project, sources, requirements, default_build,
usage_requirements):
AliasTarget.__init__(self, name, project, sources, requirements, default_build,
usage_requirements)
# On Linux, we build release variant by default, since few users will
# ever want to debug C++ Boost libraries, and there's no ABI
# incompatibility between debug and release variants. We build
# shared and static libraries since that's what most packages
# seem to provide (.so in libfoo and .a in libfoo-dev).
self.minimal_properties = property_set.create([
"<variant>release", "<threading>multi", "<link>shared", "<link>static",
"<runtime-link>shared"])
# On Windows, new IDE projects use:
#
# runtime-link=dynamic, threading=multi, variant=(debug|release)
#
# and in addition, C++ Boost's autolink defaults to static linking.
self.minimal_properties_win = property_set.create([
"<variant>debug", "<variant>release", "<threading>multi", "<link>static",
"<runtime-link>shared"])
self.complete_properties = property_set.create([
"<variant>debug", "<variant>release",
"<threading>single", "<threading>multi"
"<link>shared", "<link>static",
"<runtime-link>shared", "<runtime-link>static"])
def generate(self, ps):
global top_level_targets
top_level_targets.append(self.name())
if build_type == "minimal":
os = ps.get('target-os')
# Because we completely override parent's 'generate'
# we need to check for default value of feature ourself.
if not os:
os = feature.get('target-os').default()
if os == "windows":
expanded = targets.apply_default_build(ps, self.minimal_properties_win)
else:
expanded = targets.apply_default_build(ps, self.minimal_properties)
return self.build_multiple(expanded)
elif build_type == "complete":
expanded = targets.apply_default_build(ps, self.complete_properties)
# Filter inappopriate combinations
filtered = []
for p in expanded:
# See comment in handle-static-runtime regarding this logic.
if ps.get("link") == ["shared"] and p.get("runtime-link") == ["static"] \
and p.get("toolset") != ["cw"]:
# Skip this
pass
else:
filtered.append(p)
return build_multiple(filtered)
else:
get_manager().errors("Unknown build type")
def build_multiple(self, property_sets):
usage_requirements = property_set.empty()
result = []
for p in property_sets:
r = AliasTarget.generate(self, p)
if r:
usage_requirements = usage_requirements.add(r.usage_requirements())
result.extend(r.targets())
return targets.GenerateResult(usage_requirements, unique(result))
def declare_top_level_targets(libraries, headers):
declare_install_and_stage_proper_targets(libraries, headers)
targets.create_metatarget(TopLevelTarget,
"install",
["install-proper", "install-unversioned"])
targets.create_metatarget(TopLevelTarget,
"stage",
["stage-proper", "stage-unversioned"])
message("explain", "\nBuilding the Boost C++ Libraries.\n\n")
get_manager().projects().current().mark_targets_as_explicit(
["install", "stage", "explain"])
# This target is built by default, and will forward to 'stage'
# after producing some explanations.
targets.create_metatarget(TopLevelTarget,
"forward",
["explain", "stage"])
stage_abs = os.path.abspath(os.path.join(stage_locate, "lib"))
##############################################################################
#
# 4. Add hook to report configuration before the build, and confirmation
# with setup instructions after the build
#
##############################################################################
def pre_build():
if "stage" in top_level_targets or "install" in top_level_targets:
configure.print_component_configuration()
build_system.add_pre_build_hook(pre_build)
def post_build(ok):
if "forward" in top_level_targets and ok:
print """\n\nThe Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
%s
The following directory should be added to linker library paths:
%s
""" % (BOOST_ROOT, stage_abs)
build_system.set_post_build_hook(post_build)
##############################################################################
#
# 5. Top-level setup
#
##############################################################################
def libraries_to_install(existing_libraries):
# Decides which libraries are to be installed by looking at --with-<library>
# --without-<library> arguments. Returns the list of directories under "libs"
# which must be built and installed.
with_parameter = regex.transform(sys.argv, "--with-(.*)")
without_parameter = regex.transform(sys.argv, "--without-(.*)")
if not with_parameter and not without_parameter:
# Nothing is specified on command line. See if maybe
# project-config.jam has some choices.
project_config_libs = bjam.call("peek", "project-config", "libraries")
with_parameter = regex.transform(project_config_libs, "--with-(.*)")
without_parameter = regex.transform(project_config_libs, "--without-(.*)")
# Do some checks.
if with_parameter and without_parameter:
get_manager().errors()("both --with-<library> and --without-<library> specified")
wrong = set.difference(with_parameter, existing_libraries)
if wrong:
get_manager().errors()("wrong library name '" + wrong[0] + "' in the --with-<library> option.")
wrong = set.difference(without_parameter, existing_libraries)
if wrong:
get_manager().errors()("wrong library name '" + wrong[0] + "' in the --without-<library> option.")
if with_parameter:
return set.intersection(existing_libraries, with_parameter)
else:
return set.difference(existing_libraries, without_parameter)
def declare_targets(all_libraries, headers):
configure.register_components(all_libraries)
# Select the libraries to install.
libraries = libraries_to_install(all_libraries)
configure.components_building(libraries)
if option.get("show-libraries", None, True):
print "The following libraries require building:"
for l in libraries:
print " - " + l
sys.exit(0)
declare_top_level_targets(libraries, headers)
+27 -44
View File
@@ -1,24 +1,30 @@
@ECHO OFF
SETLOCAL
REM Copyright 2019-2020 Rene Rivera
REM Copyright (C) 2009 Vladimir Prus
REM
REM Distributed under the Boost Software License, Version 1.0.
REM (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
ECHO Building Boost.Build engine
if exist ".\tools\build\src\engine\b2.exe" del tools\build\src\engine\b2.exe
if exist ".\tools\build\src\engine\bin.ntx86\b2.exe" del tools\build\src\engine\bin.ntx86\b2.exe
if exist ".\tools\build\src\engine\bin.ntx86\bjam.exe" del tools\build\src\engine\bin.ntx86\bjam.exe
if exist ".\tools\build\src\engine\bin.ntx86_64\b2.exe" del tools\build\src\engine\bin.ntx86_64\b2.exe
if exist ".\tools\build\src\engine\bin.ntx86_64\bjam.exe" del tools\build\src\engine\bin.ntx86_64\bjam.exe
pushd tools\build\src\engine
call .\build.bat %*
call .\build.bat %* > ..\..\..\..\bootstrap.log
@ECHO OFF
popd
if exist ".\tools\build\src\engine\b2.exe" (
copy .\tools\build\src\engine\b2.exe . > nul
if exist ".\tools\build\src\engine\bin.ntx86\bjam.exe" (
copy .\tools\build\src\engine\bin.ntx86\b2.exe . > nul
copy .\tools\build\src\engine\bin.ntx86\bjam.exe . > nul
goto :bjam_built)
if exist ".\tools\build\src\engine\bin.ntx86_64\bjam.exe" (
copy .\tools\build\src\engine\bin.ntx86_64\b2.exe . > nul
copy .\tools\build\src\engine\bin.ntx86_64\bjam.exe . > nul
goto :bjam_built)
goto :bjam_failure
@@ -28,32 +34,12 @@ goto :bjam_failure
REM Ideally, we should obtain the toolset that build.bat has
REM guessed. However, it uses setlocal at the start and does not
REM export BOOST_JAM_TOOLSET, and I don't know how to do that
REM properly. Default to msvc if not specified.
REM properly. Default to msvc for now.
set toolset=msvc
SET TOOLSET=msvc
IF "%1"=="gcc" SET TOOLSET=gcc
IF "%1"=="clang" SET TOOLSET=clang
IF "%1"=="borland" SET TOOLSET=embarcadero
IF "%1"=="vc71" SET TOOLSET=msvc : 7.1
IF "%1"=="vc8" SET TOOLSET=msvc : 8.0
IF "%1"=="vc9" SET TOOLSET=msvc : 9.0
IF "%1"=="vc10" SET TOOLSET=msvc : 10.0
IF "%1"=="vc11" SET TOOLSET=msvc : 11.0
IF "%1"=="vc12" SET TOOLSET=msvc : 12.0
IF "%1"=="vc14" SET TOOLSET=msvc : 14.0
IF "%1"=="vc141" SET TOOLSET=msvc : 14.1
IF "%1"=="vc142" SET TOOLSET=msvc : 14.2
IF "%1"=="vc143" SET TOOLSET=msvc : 14.3
ECHO.
ECHO Generating Boost.Build configuration in project-config.jam for %TOOLSET%...
ECHO # Boost.Build Configuration > project-config.jam
ECHO # Automatically generated by bootstrap.bat >> project-config.jam
ECHO import option ; > project-config.jam
ECHO. >> project-config.jam
ECHO import option ; >> project-config.jam
ECHO. >> project-config.jam
ECHO using %TOOLSET% ; >> project-config.jam
ECHO using %toolset% ; >> project-config.jam
ECHO. >> project-config.jam
ECHO option.set keep-going : false ; >> project-config.jam
ECHO. >> project-config.jam
@@ -62,15 +48,7 @@ ECHO.
ECHO Bootstrapping is done. To build, run:
ECHO.
ECHO .\b2
ECHO.
IF EXIST libs\config\include (
ECHO. To generate header files, run:
ECHO.
ECHO. .\b2 headers
ECHO.
)
ECHO.
ECHO To adjust configuration, edit 'project-config.jam'.
ECHO Further information:
ECHO.
@@ -81,8 +59,7 @@ ECHO - Getting started guide:
ECHO http://boost.org/more/getting_started/windows.html
ECHO.
ECHO - Boost.Build documentation:
ECHO http://www.boost.org/build/
ECHO.
ECHO http://www.boost.org/build/doc/html/index.html
goto :end
@@ -90,9 +67,15 @@ goto :end
ECHO.
ECHO Failed to build Boost.Build engine.
ECHO Please consult bootstrap.log for further diagnostics.
ECHO.
ECHO You can try to obtain a prebuilt binary from
ECHO.
ECHO http://sf.net/project/showfiles.php?group_id=7586^&package_id=72941
ECHO.
ECHO Also, you can file an issue at http://svn.boost.org
ECHO Please attach bootstrap.log in that case.
REM Set an error code to allow `bootstrap && b2`
cmd /c exit /b 1 > nul
goto :end
:end
+23 -31
View File
@@ -1,5 +1,4 @@
#!/bin/sh
# Copyright 2019-2021 René Ferdinand Rivera Morell
# Copyright (C) 2005, 2006 Douglas Gregor.
# Copyright (C) 2006 The Trustees of Indiana University
#
@@ -142,9 +141,7 @@ done
if test "x$want_help" = xyes; then
cat <<EOF
\`./bootstrap.sh\' builds the Boost build system B2 and prepares Boost for
building. This includes setting defaults in the project-config.jam which you
can adjust prior to invoking B2.
\`./bootstrap.sh' prepares Boost for building on a few kinds of systems.
Usage: $0 [OPTION]...
@@ -154,8 +151,7 @@ Configuration:
-h, --help display this help and exit
--with-bjam=BJAM use existing Boost.Jam executable (bjam)
[automatically built]
--with-toolset=TOOLSET use specific TOOLSET to build B2 and as default
for building Boost
--with-toolset=TOOLSET use specific Boost.Build toolset
[automatically detected]
--show-libraries show the set of libraries that require build
and installation steps (i.e., those libraries
@@ -192,13 +188,14 @@ EOF
fi
test -n "$want_help" && exit 0
my_dir=$(dirname "$0")
# TBD: Determine where the script is located
my_dir="."
# Determine the toolset, if not already decided
if test "x$TOOLSET" = x; then
guessed_toolset=`CXX= CXXFLAGS= $my_dir/tools/build/src/engine/build.sh --guess-toolset`
guessed_toolset=`$my_dir/tools/build/src/engine/build.sh --guess-toolset`
case $guessed_toolset in
acc | clang | gcc | como | mipspro | pathscale | pgi | qcc | vacpp )
acc | darwin | gcc | como | mipspro | pathscale | pgi | qcc | vacpp )
TOOLSET=$guessed_toolset
;;
@@ -215,7 +212,7 @@ if test "x$TOOLSET" = x; then
;;
* )
# Not supported by B2
# Not supported by Boost.Build
;;
esac
fi
@@ -224,18 +221,21 @@ rm -f config.log
# Build bjam
if test "x$BJAM" = x; then
$ECHO "Building B2 engine.."
$ECHO -n "Building Boost.Build engine with toolset $TOOLSET... "
pwd=`pwd`
CXX= CXXFLAGS= "$my_dir/tools/build/src/engine/build.sh" ${TOOLSET}
(cd "$my_dir/tools/build/src/engine" && ./build.sh "$TOOLSET") > bootstrap.log 2>&1
if [ $? -ne 0 ]; then
echo
echo "Failed to build B2 build engine"
echo "Failed to build Boost.Build build engine"
echo "Consult 'bootstrap.log' for more details"
exit 1
fi
cd "$pwd"
BJAM="$my_dir/tools/build/src/engine/b2"
echo "tools/build/src/engine/b2"
arch=`cd $my_dir/tools/build/src/engine && ./bootstrap/jam0 -d0 -f build.jam --toolset=$TOOLSET --toolset-root= --show-locate-target && cd ..`
BJAM="$my_dir/tools/build/src/engine/$arch/b2"
echo "tools/build/src/engine/$arch/b2"
cp "$BJAM" .
cp "$my_dir/tools/build/src/engine/$arch/bjam" .
fi
@@ -293,11 +293,6 @@ fi
# Configure ICU
$ECHO -n "Unicode/ICU support for Boost.Regex?... "
if test "x$flag_icu" != xno; then
if test "x$ICU_ROOT" = x; then
if command -v pkg-config > /dev/null && pkg-config icu-uc ; then
ICU_ROOT=`pkg-config --variable=prefix icu-uc`
fi
fi
if test "x$ICU_ROOT" = x; then
COMMON_ICU_PATHS="/usr /usr/local /sw"
for p in $COMMON_ICU_PATHS; do
@@ -329,14 +324,14 @@ if test -r "project-config.jam"; then
counter=`expr $counter + 1`
done
echo "Backing up existing B2 configuration in project-config.jam.$counter"
echo "Backing up existing Boost.Build configuration in project-config.jam.$counter"
mv "project-config.jam" "project-config.jam.$counter"
fi
# Generate user-config.jam
echo "Generating B2 configuration in project-config.jam for $TOOLSET..."
echo "Generating Boost.Build configuration in project-config.jam..."
cat > project-config.jam <<EOF
# B2 Configuration
# Boost.Build Configuration
# Automatically generated by bootstrap.sh
import option ;
@@ -361,7 +356,7 @@ if test "x$flag_no_python" = x; then
import python ;
if ! [ python.configured ]
{
using python : $PYTHON_VERSION : "$PYTHON_ROOT" ;
using python : $PYTHON_VERSION : $PYTHON_ROOT ;
}
EOF
fi
@@ -402,11 +397,8 @@ Bootstrapping is done. To build, run:
To generate header files, run:
./b2 headers
The configuration generated uses ${TOOLSET} to build by default. If that is
unintended either use the --with-toolset option or adjust configuration, by
editing 'project-config.jam'.
To adjust configuration, edit 'project-config.jam'.
Further information:
- Command line help:
@@ -415,7 +407,7 @@ Further information:
- Getting started guide:
http://www.boost.org/more/getting_started/unix-variants.html
- B2 documentation:
http://www.boost.org/build/
- Boost.Build documentation:
http://www.boost.org/build/doc/html/index.html
EOF
+54
View File
@@ -0,0 +1,54 @@
# Use, modification, and distribution are
# subject to 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)
#
# Copyright Rene Rivera 2015-2016.
machine:
environment:
SCRIPT_N: ci_boost_release ci_boost_release
EOL_N: LF CRLF
pre:
- |
wget "https://raw.githubusercontent.com/boostorg/release-tools/develop/ci_boost_common.py" -P ${HOME}
wget "https://raw.githubusercontent.com/boostorg/release-tools/develop/ci_boost_library_check.py" -P ${HOME}
wget "https://raw.githubusercontent.com/boostorg/release-tools/develop/ci_boost_release.py" -P ${HOME}
wget "https://raw.githubusercontent.com/boostorg/release-tools/develop/ci_boost_status.py" -P ${HOME}
echo '#!/bin/bash' > ${HOME}/script.sh
echo 'export SCRIPT_N=(${SCRIPT_N})' >> "${HOME}/script.sh"
echo 'export SCRIPT=${SCRIPT_N[$CIRCLE_NODE_INDEX]}' >> "${HOME}/script.sh"
echo 'export EOL_N=(${EOL_N})' >> "${HOME}/script.sh"
echo 'export EOL=${EOL_N[$CIRCLE_NODE_INDEX]}' >> "${HOME}/script.sh"
echo 'python "${HOME}/${SCRIPT}.py" "$@"' >> "${HOME}/script.sh"
chmod +x "${HOME}/script.sh"
post:
- sudo apt-get update
- sudo apt-get install xsltproc
- exec "${HOME}/script.sh" machine_post
checkout:
post:
- exec "${HOME}/script.sh" checkout_post
dependencies:
pre:
- exec "${HOME}/script.sh" dependencies_pre
override:
- exec "${HOME}/script.sh" dependencies_override
post:
- exec "${HOME}/script.sh" dependencies_post
database:
pre:
- exec "${HOME}/script.sh" database_pre
override:
- exec "${HOME}/script.sh" database_override
post:
- exec "${HOME}/script.sh" database_post
test:
pre:
- exec "${HOME}/script.sh" test_pre:
parallel: true
override:
- exec "${HOME}/script.sh" test_override:
parallel: true
post:
- exec "${HOME}/script.sh" test_post:
parallel: true
+35
View File
@@ -0,0 +1,35 @@
#
# BoostDetectToolset: defines BOOST_DETECTED_TOOLSET
#
# Copyright 2017 Peter Dimov
#
# Distributed under the Boost Software License 1.0
#
set(BOOST_DETECTED_TOOLSET "")
if(MSVC)
if(MSVC_VERSION EQUAL 1910)
set(BOOST_DETECTED_TOOLSET "vc141")
elseif(MSVC_VERSION EQUAL 1900)
set(BOOST_DETECTED_TOOLSET "vc140")
elseif(MSVC_VERSION EQUAL 1800)
set(BOOST_DETECTED_TOOLSET "vc120")
elseif(MSVC_VERSION EQUAL 1700)
set(BOOST_DETECTED_TOOLSET "vc110")
elseif(MSVC_VERSION EQUAL 1600)
set(BOOST_DETECTED_TOOLSET "vc100")
elseif(MSVC_VERSION EQUAL 1500)
set(BOOST_DETECTED_TOOLSET "vc90")
elseif(MSVC_VERSION EQUAL 1400)
set(BOOST_DETECTED_TOOLSET "vc80")
elseif(MSVC_VERSION EQUAL 1310)
set(BOOST_DETECTED_TOOLSET "vc71")
elseif(MSVC_VERSION EQUAL 1300)
set(BOOST_DETECTED_TOOLSET "vc7")
elseif(MSVC_VERSION EQUAL 1200)
set(BOOST_DETECTED_TOOLSET "vc6")
endif()
elseif(MINGW)
set(BOOST_DETECTED_TOOLSET "mgw")
endif()
+480
View File
@@ -0,0 +1,480 @@
#
# CMake configuration support for stage/install
#
# Copyright 2017 Peter Dimov
#
# Distributed under the Boost Software License, 1.0
#
import print ;
import option ;
import os ;
import path ;
import boostcpp ;
import modules ;
import property-set ;
import "class" : new ;
import feature ;
import toolset ;
import regex ;
import common ;
if "--debug-cmake" in [ modules.peek : ARGV ]
{
.info-enabled = 1 ;
}
local rule .info ( messages * )
{
if $(.info-enabled)
{
ECHO info: $(messages) ;
}
}
#
local BOOST_STAGE_LOCATE = [ option.get stagedir : ../stage ] ;
.info BOOST_STAGE_LOCATE is $(BOOST_STAGE_LOCATE) ;
local BOOST_VERSION_TAG = [ modules.peek boostcpp : BOOST_VERSION_TAG ] ;
.info BOOST_VERSION_TAG is $(BOOST_VERSION_TAG) ;
# layout
local layout = [ modules.peek boostcpp : layout ] ;
.info layout is $(layout) ;
# prefix
local default-prefix = "" ;
if [ os.name ] = NT
{
default-prefix = C:/Boost ;
}
else
{
default-prefix = /usr/local ;
}
.info default-prefix is $(default-prefix) ;
local prefix = [ option.get prefix : $(default-prefix) ] ;
.info prefix is $(prefix) ;
# header-subdir
header-subdir = "" ;
if $(layout) = versioned
{
header-subdir = /boost-$(BOOST_VERSION_TAG) ;
}
.info header-subdir is $(header-subdir) ;
# libdir
local libdir = [ option.get libdir : $(prefix)/lib ] ;
.info libdir is $(libdir) ;
# generate-config
local rule generate-config ( target type )
{
.info generate-config $(target) :: $(type) ;
local name = [ MATCH boost_(.*)-config.cmake : $(target) ] ;
.info generate-config: name is $(name) ;
local cmake-lib = boost_$(name) ;
local cmake-target = boost::$(name) ;
print.output $(target) ;
print.text
"# Generated by Boost $(BOOST_VERSION)"
""
"cmake_minimum_required(VERSION 3.5)"
""
"if(TARGET $(cmake-target))"
" return()"
"endif()"
""
"# Compute the installation prefix relative to this file."
"get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)"
"get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)"
"get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)"
"get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)"
""
"# Create imported target $(cmake-target)"
"add_library($(cmake-target) $(type) IMPORTED)"
""
"set_target_properties($(cmake-target) PROPERTIES"
" INTERFACE_INCLUDE_DIRECTORIES \"\${_IMPORT_PREFIX}/include$(header-subdir)\""
")"
""
"get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)"
""
"include(${_DIR}/../BoostDetectToolset-$(BOOST_VERSION).cmake)"
""
"file(GLOB CONFIG_FILES "${_DIR}/libboost_$(name)-config-variant*.cmake")"
"foreach(f ${CONFIG_FILES})"
" include(${f})"
"endforeach()"
""
"set(CONFIG_FILES)"
"set(_DIR)"
"set(_IMPORT_PREFIX)"
""
"include(CMakeFindDependencyMacro)"
"function(boost_declare_dependency package type target)"
" find_dependency(${package} $(BOOST_VERSION) EXACT)"
" set_property(TARGET boost::$(name) APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${target})"
"endfunction()"
"include(\${CMAKE_CURRENT_LIST_DIR}/$(cmake-lib)-dependencies.cmake)"
""
: true ;
}
rule generate-header-config ( target : sources * : properties * )
{
generate-config $(target) INTERFACE ;
}
rule generate-static-config ( target : sources * : properties * )
{
generate-config $(target) UNKNOWN ;
}
# generate-config-version
rule generate-config-version ( target : sources * : properties * )
{
.info generate-config-version $(target) ;
local name = [ MATCH boost_(.*)-config-version.cmake : $(target) ] ;
.info generate-config-version: name is $(name) ;
print.output $(target) ;
print.text
"# Generated by Boost $(BOOST_VERSION)"
""
"set(PACKAGE_VERSION $(BOOST_VERSION))"
""
"if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)"
" set(PACKAGE_VERSION_COMPATIBLE FALSE)"
"else()"
" set(PACKAGE_VERSION_COMPATIBLE TRUE)"
" if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)"
" set(PACKAGE_VERSION_EXACT TRUE)"
" endif()"
"endif()"
""
: true ;
}
# generate-config-variant-
rule generate-config-variant- ( target : sources * : properties * )
{
.info generate-config-variant- $(target) ;
local ps = [ property-set.create $(properties) ] ;
print.output $(target) ;
print.text
"# Generated by Boost $(BOOST_VERSION)"
""
: true ;
local variant = [ $(ps).get <variant> ] ;
.info generate-config-variant-: variant is $(variant) ;
print.text "# variant=$(variant)" "" : true ;
if $(variant) = debug
{
print.text
"if(\"${BOOST_BUILD_VARIANT}\" STREQUAL \"RELEASE\")"
" return()"
"endif()"
""
: true ;
}
else
{
print.text
"if(\"${BOOST_BUILD_VARIANT}\" STREQUAL \"DEBUG\")"
" return()"
"endif()"
""
: true ;
}
local link = [ $(ps).get <link> ] ;
.info generate-config-variant-: link is $(link) ;
print.text "# link=$(link)" "" : true ;
if $(link) = static
{
print.text
"if(\"${BOOST_LINK_TYPE}\" STREQUAL \"SHARED\")"
" return()"
"endif()"
""
: true ;
}
else
{
print.text
"if(NOT \"${BOOST_LINK_TYPE}\" STREQUAL \"SHARED\")"
" return()"
"endif()"
""
: true ;
}
local runtime-link = [ $(ps).get <runtime-link> ] ;
.info generate-config-variant-: runtime-link is $(runtime-link) ;
print.text "# runtime-link=$(runtime-link)" "" : true ;
if $(runtime-link) = static
{
print.text
"if(NOT \"${BOOST_RUNTIME_LINK}\" STREQUAL \"STATIC\")"
" return()"
"endif()"
""
: true ;
}
else
{
print.text
"if(\"${BOOST_RUNTIME_LINK}\" STREQUAL \"STATIC\")"
" return()"
"endif()"
""
: true ;
}
local runtime-debugging = [ $(ps).get <runtime-debugging> ] ;
.info generate-config-variant-: runtime-debugging is $(runtime-debugging) ;
print.text "# runtime-debugging=$(runtime-debugging)" "" : true ;
local toolset = [ MATCH ^-(.*) : [ common.format-name <toolset> : "" : "" : $(ps) ] ] ;
.info generate-config-variant-: toolset is $(toolset) ;
print.text "# toolset=$(toolset)" "" : true ;
print.text
"if(NOT \"${BOOST_TOOLSET}\" STREQUAL \"\")"
" if(NOT \"${BOOST_TOOLSET}\" STREQUAL \"$(toolset)\")"
" return()"
" endif()"
"elseif(NOT \"${BOOST_DETECTED_TOOLSET}\" STREQUAL \"\" AND NOT \"${BOOST_DETECTED_TOOLSET}\" STREQUAL \"$(toolset)\")"
" return()"
"endif()"
""
: true ;
local name = [ MATCH boost_(.*)-config-variant-.*cmake : $(target) ] ;
.info generate-config-variant-: name is $(name) ;
local ftype = STATIC_LIB ;
if $(link) = shared
{
if [ os.name ] = NT
{
ftype = IMPORT_LIB ;
}
else
{
ftype = SHARED_LIB ;
}
}
local fname = [ boostcpp.tag boost_$(name) : $(ftype) : $(ps) ] ;
.info generate-config-variant-: fname is $(fname) ;
print.text "# Target file name: $(fname)" "" : true ;
print.text
"set_property(TARGET boost::$(name) APPEND PROPERTY IMPORTED_CONFIGURATIONS $(variant:U))"
"set_target_properties(boost::$(name) PROPERTIES"
" IMPORTED_LINK_INTERFACE_LANGUAGES_$(variant:U) CXX"
" IMPORTED_LOCATION_$(variant:U) \"${_IMPORT_PREFIX}/lib/$(fname)\""
" )"
""
: true ;
}
# tag
rule tag ( name : type ? : property-set )
{
.info tag $(name) :: $(type) :: $(property-set) ;
local link = [ $(property-set).get <link> ] ;
.info tag: link is $(link) ;
local r = [ boostcpp.tag $(name) : STATIC_LIB : $(property-set) ] ;
r = $(r:S=$(name:S)) ;
r = $(r:B=$(r:B)-$(link)) ;
.info tag: returning $(r) ;
return $(r) ;
}
# generate-config-variant
rule generate-config-variant ( project name : property-set : sources * )
{
.info generate-config-variant $(project) $(name) :: $(property-set) :: $(sources) ;
local tag = [ tag $(name) : : $(property-set) ] ;
.info generate-config-variant: tag is $(tag) ;
local result ;
local a = [ new non-scanning-action : $(__name__).generate-config-variant- : $(property-set) ] ;
result += [ new file-target $(tag) : : $(project) : $(a) ] ;
return $(result) ;
}
# exists
local rule exists ( path )
{
return [ glob $(path) ] ;
}
# boostdep-cmake
alias boostdep : ../tools/boostdep/build//boostdep : <variant>release <link>static <runtime-link>shared <runtime-debugging>off <define>NDEBUG <threading>multi ;
feature.feature boostdep-module : : free ;
toolset.flags boostdep-cmake MODULE : <boostdep-module> ;
actions boostdep-cmake
{
$(2) --cmake $(MODULE) > $(1)
}
# create stage and install targets
local library-dirs = [ MATCH (.*)/include : [ glob ../libs/*/include ../libs/numeric/*/include ] ] ;
for dir in $(library-dirs)
{
.info Processing directory $(dir) ;
local rname = [ MATCH .*/libs/(.*) : $(dir) ] ;
.info rname is $(rname) ;
local name = [ regex.replace $(rname) "/" "_" ] ;
.info name is $(name) ;
local reqs = <variant>release <link>static <runtime-link>shared <runtime-debugging>off <define>NDEBUG <threading>multi ;
# generate -config.cmake
local config-targets ;
# boost_math, a dependency of lexical_cast, has six optional libraries, none of which named boost_math
# boost_exception has an optional MSVC-only library, which creates problems under Linux
if [ exists $(dir)/build ] && [ exists $(dir)/src ] && $(name) != "math" && $(name) != "exception"
{
.info Library $(name) is not header-only ;
make boost_$(name)-config.cmake : : @generate-static-config : $(reqs) ;
explicit boost_$(name)-config.cmake ;
config-targets = boost_$(name)-config.cmake ;
generate boost_$(name)-config-variant.cmake : : <generating-rule>@generate-config-variant <threading>multi ;
explicit boost_$(name)-config-variant.cmake ;
config-targets += boost_$(name)-config-variant.cmake ;
}
else
{
.info Library $(name) is header-only ;
make boost_$(name)-config.cmake : : @generate-header-config : $(reqs) ;
explicit boost_$(name)-config.cmake ;
config-targets = boost_$(name)-config.cmake ;
}
# generate -config-version.cmake
make boost_$(name)-config-version.cmake : : @generate-config-version : $(reqs) ;
explicit boost_$(name)-config-version.cmake ;
config-targets += boost_$(name)-config-version.cmake ;
# generate -dependencies.cmake
make boost_$(name)-dependencies.cmake : boostdep : @boostdep-cmake : <boostdep-module>$(rname) $(reqs) ;
config-targets += boost_$(name)-dependencies.cmake ;
.info The config-targets of $(name) are $(config-targets) ;
# stage
local stage-location = $(BOOST_STAGE_LOCATE)/lib/cmake/boost_$(name)-$(BOOST_VERSION) ;
.info The staging location of $(name) is $(stage-location) ;
install $(dir)-stage : $(config-targets) : <location>$(stage-location) ;
explicit $(dir)-stage ;
# install
local install-location = $(libdir)/cmake/boost_$(name)-$(BOOST_VERSION) ;
.info The install location of $(name) is $(install-location) ;
install $(dir)-install : $(config-targets) : <location>$(install-location) ;
explicit $(dir)-install ;
}
# BoostDetectToolset.cmake
install BoostDetectToolset-stage : BoostDetectToolset.cmake : <name>BoostDetectToolset-$(BOOST_VERSION).cmake <location>$(BOOST_STAGE_LOCATE)/lib/cmake ;
explicit BoostDetectToolset-stage ;
install BoostDetectToolset-install : BoostDetectToolset.cmake : <name>BoostDetectToolset-$(BOOST_VERSION).cmake <location>$(libdir)/cmake ;
explicit BoostDetectToolset-install ;
# stage
alias stage : BoostDetectToolset-stage $(library-dirs)-stage ;
explicit stage ;
# install
alias install : BoostDetectToolset-install $(library-dirs)-install ;
explicit install ;
+20 -38
View File
@@ -1,5 +1,5 @@
# Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
# Copyright (c) 2016-2018 Rene Rivera
# Copyright (c) 2016 Rene Rivera
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
@@ -21,11 +21,10 @@ import generators ;
import sequence ;
import path ;
import "class" : is-a ;
import regex ;
path-constant BOOST_DOC : . ;
local lib-docs = [ path.glob [ path.glob $(BOOST_DOC)/../libs $(BOOST_DOC)/../tools : */doc ]
local lib-docs = [ path.glob [ path.glob $(BOOST_DOC)/../libs : */doc ]
: [ modules.peek project : JAMFILE ] ] ;
local rule find-target-of-class-or-type ( root-target : klass ? : type ? )
@@ -85,11 +84,6 @@ local rule docbook-target-spec ( main-target )
return $(spec) ;
}
local exclude-libs = [ MATCH "^--exclude-libraries=(.*)" : [ modules.peek : ARGV ] ] ;
exclude-libs = [ regex.split-list $(exclude-libs) : "," ] ;
#ECHO "=== --exclude-libraries:" $(exclude-libs) ;
local lib-doc-boostdoc-refs ;
local lib-doc-boostrelease-refs ;
@@ -98,38 +92,25 @@ for local lib-doc in $(lib-docs)
{
#ECHO === $(lib-doc) ... ;
local doc-project = $(lib-doc:D) ;
local lib-dir = $(doc-project:D) ;
local lib-name = $(lib-dir:BS) ;
#ECHO "=== lib-name:" $(lib-name) ... ;
if $(lib-name) in $(exclude-libs)
local doc-module = [ project.find $(doc-project)
: [ project.attribute $(__name__) location ] ] ;
local doc-target = [ project.target $(doc-module) ] ;
$(doc-target).build-main-targets ;
local boostrelease-target = [ $(doc-target).main-target boostrelease ] ;
if $(boostrelease-target)
{
ECHO "-- Excluded library" '$(lib-name)' ;
local full-name = [ $(boostrelease-target).full-name ] ;
local target-path = [ path.relative-to $(this-path) $(full-name:D) ] ;
lib-doc-boostrelease-refs += $(target-path)//boostrelease ;
#ECHO " ::" $(target-path)//boostrelease ;
}
else
local boostdoc-target = [ $(doc-target).main-target boostdoc ] ;
if $(boostdoc-target)
{
local doc-module = [ project.find $(doc-project)
: [ project.attribute $(__name__) location ] ] ;
local doc-target = [ project.target $(doc-module) ] ;
$(doc-target).build-main-targets ;
local boostrelease-target = [ $(doc-target).main-target boostrelease ] ;
if $(boostrelease-target)
{
local full-name = [ $(boostrelease-target).full-name ] ;
local target-path = [ path.relative-to $(this-path) $(full-name:D) ] ;
lib-doc-boostrelease-refs += $(target-path)//boostrelease ;
#ECHO " ::" $(target-path)//boostrelease ;
}
local boostdoc-target = [ $(doc-target).main-target boostdoc ] ;
if $(boostdoc-target)
{
local full-name = [ $(boostdoc-target).full-name ] ;
local target-path = [ path.relative-to $(this-path) $(full-name:D) ] ;
lib-doc-boostdoc-refs += $(target-path)//boostdoc ;
#ECHO " ::" $(target-path)//boostdoc ;
}
local full-name = [ $(boostdoc-target).full-name ] ;
local target-path = [ path.relative-to $(this-path) $(full-name:D) ] ;
lib-doc-boostdoc-refs += $(target-path)//boostdoc ;
#ECHO " ::" $(target-path)//boostdoc ;
}
}
@@ -197,8 +178,10 @@ xinclude libraries :
explicit libraries ;
xinclude tools :
../tools/build/doc//jam_docs
../tools/quickbook/doc//quickbook
../tools/boostbook/doc/boostbook.xml
../tools/build/doc/src/userman.xml
;
explicit tools ;
@@ -206,7 +189,6 @@ boostbook doc
:
src/boost.xml
:
<xsl:param>generate.consistent.ids=1
<use>$(lib-doc-boostdoc-refs)
<dependency>libraries
<implicit-dependency>libraries
+2 -2
View File
@@ -7,10 +7,10 @@
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) -->
<title>Redirect to generated documentation</title>
<meta http-equiv="refresh" content="0; URL=../../tools/build/doc/html/index.html">
<meta http-equiv="refresh" content="0; URL=http://www.boost.org/doc/libs/master/doc/html/bbv2.html">
</head>
<body>
Automatic redirection failed, please go to
<a href="../../tools/build/doc/html/index.html">../../tools/build/doc/html/index.html</a>
<a href="http://www.boost.org/doc/libs/master/doc/html/bbv2.html">http://www.boost.org/doc/libs/master/doc/html/bbv2.html</a>
</body>
</html>
+1
View File
@@ -77,6 +77,7 @@ install pdf-install
../../libs/ratio/doc//standalone
../../libs/random/doc//standalone
../../libs/regex/doc//standalone
../../libs/signals/doc//doc
../../libs/spirit/repository/doc//spirit2_repository
../../libs/static_assert/doc//standalone
../../libs/thread/doc//standalone
+1 -1
View File
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
boost_version=$(grep 'define.*BOOST_LIB_VERSION' ../../boost/version.hpp | sed 's/.*"\([^"]*\)".*/\1/')
echo Boost version tag = $boost_version
(cd ../../libs/accumulators/doc && bjam -a --hash) 2>&1 | tee build.log
+1 -1
View File
@@ -39,7 +39,7 @@
<title>The Boost C++ Libraries (BoostBook Subset)</title>
<xi:include href="libraries.xinclude" xpointer="xpointer(/*/node())"/>
<library name="Concept Check" dirname="concept_check" id="concept_check">
<library name="Concept Check" dirname="concept_check">
<libraryinfo>
<author>
<firstname>Jeremy</firstname>
+1 -74
View File
@@ -5,7 +5,6 @@ http://spirit.sourceforge.net/
Copyright 2013 Niall Douglas additions for colors and alignment.
Copyright 2013 Paul A. Bristow additions for more colors and alignments.
Copyright 2017 Tom Westerhout font fixes to support Sphinx
Distributed under the Boost Software License, Version 1.0. (See accompany-
ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -18,7 +17,6 @@ Body defaults
body
{
margin: 1em;
font-size: 16px;
font-family: sans-serif;
}
@@ -26,7 +24,7 @@ Body defaults
Paragraphs
=============================================================================*/
p, div.document, div.footer
p
{
text-align: left;
font-size: 10pt;
@@ -50,7 +48,6 @@ Program listings
padding: 0.5pc 0.5pc 0.5pc 0.5pc;
}
div.highlight,
.programlisting,
.screen
{
@@ -317,7 +314,6 @@ Blurbs
div.important,
div.caution,
div.warning,
div.blurb,
p.blurb
{
font-size: 9pt; /* A little bit smaller than the main text */
@@ -327,7 +323,6 @@ Blurbs
padding: 0.5pc 0.5pc 0.5pc 0.5pc;
}
div.blurb img,
p.blurb img
{
padding: 1pt;
@@ -416,80 +411,15 @@ Colors
}
/* Syntax Highlighting */
.property,
.highlight .k,
.highlight .kc,
.highlight .kd,
.highlight .kn,
.highlight .kp,
.highlight .kr,
.highlight .kt,
.keyword { color: #0000AA; }
.highlight .n,
.highlight .na,
.highlight .nb,
.highlight .bp,
.highlight .nc,
.highlight .no,
.highlight .nd,
.highlight .ni,
.highlight .ne,
.highlight .nf,
.highlight .py,
.highlight .nl,
.highlight .nn,
.highlight .nx,
.highlight .nt,
.highlight .nv,
.highlight .vc,
.highlight .vg,
.highlight .vi,
.identifier { color: #000000; }
.special { color: #707070; }
.highlight .cp,
.preprocessor { color: #402080; }
.highlight .sc
.char { color: teal; }
.highlight .c,
.highlight .ch,
.highlight .cm,
.highlight .cp,
.highlight .cpf,
.highlight .c1,
.highlight .cs,
.highlight .sd,
.highlight .sh,
.comment { color: #800000; }
.highlight .s,
.highlight .sa,
.highlight .sb,
.highlight .dl,
.highlight .s2,
.highlight .se,
.highlight .si,
.highlight .sx,
.highlight .sr,
.highlight .s1,
.highlight .ss,
.string { color: teal; }
.highlight .m,
.highlight .mf,
.highlight .mh,
.highlight .mi,
.highlight .mo,
.number { color: teal; }
.highlight,
.white_bkd { background-color: #FFFFFF; }
.highlight .hll,
.dk_grey_bkd { background-color: #999999; }
/* Links */
@@ -532,7 +462,6 @@ Colors
border: 1px solid #DCDCDC;
}
div.highlight,
.programlisting,
.screen
{
@@ -551,7 +480,6 @@ Colors
div.important,
div.caution,
div.warning,
div.blurb,
p.blurb
{
border: 1px solid #DCDCDC;
@@ -613,7 +541,6 @@ Colors
border: 1px solid gray;
}
div.highlight,
.programlisting,
.screen
{
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Copyright (c) 2007 Beman Dawes
© Copyright Beman Dawes, 2007
Distributed under the Boost Software License, Version 1.0.
See www.boost.org/LICENSE_1_0.txt
+2 -2
View File
@@ -11,7 +11,7 @@ http://www.boost.org/LICENSE_1_0.txt).
[/ See http://www.htmlhelp.com/reference/html40/entities/symbols.html]
[/ All (except 2 angle brackets) show OK on Firefox 2.0]
[/ Also some miscellaneous math characters added to this list - see the end.]
[/ Also some miscellaneous math charaters added to this list - see the end.]
[/ To use, enclose the template name in square brackets.]
@@ -99,7 +99,7 @@ http://www.boost.org/LICENSE_1_0.txt).
[template notin[]'''&#x2209;'''] [/ ? not an element of]
[template ni[]'''&#x220B;'''] [/ ? contains as member]
[template prod[]'''&#x220F;'''] [/ ? n-ary product = product sign]
[template sum[]'''&#x2211;'''] [/ ? n-ary summation]
[template sum[]'''&#x2211;'''] [/ ? n-ary sumation]
[template minus[]'''&#x2212;'''] [/ - minus sign]
[template lowast[]'''&#x2217;'''] [/ * asterisk operator]
[template radic[]'''&#x221A;'''] [/ v square root = radical sign]
@@ -27,7 +27,7 @@
<a name="document_to_test_formatting.images"></a><a class="link" href="images.html" title="Images">Images</a>
</h2></div></div></div>
<p>
These are tricky enough that they warrant their own section.
These are tricky enough that they warrent their own section.
</p>
<p>
Let's start with a PNG file that's set to 120dpi, it should render at a sensible
@@ -221,7 +221,7 @@
</p>
<p>
In single point exchange, we move the control point nearest to the largest
extrema to the abscissa value of the extrema.
extrema to the absissa value of the extrema.
</p>
<p>
In multi-point exchange we swap all the current control points, for the locations
@@ -450,7 +450,7 @@
and then re-minimise.
</li>
<li class="listitem">
Keep abscissa values small: use a change of variable to keep the abscissa
Keep absissa values small: use a change of variable to keep the abscissa
over, say [0, b], for some smallish value <span class="emphasis"><em>b</em></span>.
</li>
</ul></div>
+1 -1
View File
@@ -137,7 +137,7 @@
We can count in Greek too: &#945;, &#946;, &#947;.
</p>
<p>
Try some superscripts and subscripts: x<sup>2</sup>, x<sub>i</sub><sup>3</sup>, &#945;<sup>2</sup>, &#946;<sup>&#945;</sup>, &#8970;x&#8971;, &#8970;&#945;&#8971;, &#8968;a&#8969;.
Try some superscrips and subscripts: x<sup>2</sup>, x<sub>i</sub><sup>3</sup>, &#945;<sup>2</sup>, &#946;<sup>&#945;</sup>, &#8970;x&#8971;, &#8970;&#945;&#8971;, &#8968;a&#8969;.
</p>
</div>
</div>
+2 -2
View File
@@ -142,7 +142,7 @@ The N+2 extrema can then be found using standard function minimisation technique
We now have a choice: multi-point exchange, or single point exchange.
In single point exchange, we move the control point nearest to the largest extrema to
the abscissa value of the extrema.
the absissa value of the extrema.
In multi-point exchange we swap all the current control points, for the locations
of the extrema.
@@ -317,7 +317,7 @@ retaining the last set of control points at each stage.
* Try using a smaller interval. It may also be possible to optimise over
one (small) interval, rescale the control points over a larger interval,
and then re-minimise.
* Keep abscissa values small: use a change of variable to keep the abscissa
* Keep absissa values small: use a change of variable to keep the abscissa
over, say \[0, b\], for some smallish value /b/.
[h4 References]
+2 -2
View File
@@ -35,7 +35,7 @@ This is some body text.
We can count in Greek too: [alpha], [beta], [gamma].
Try some superscripts and subscripts: x[super 2], x[sub i][super 3], [alpha][super 2],
Try some superscrips and subscripts: x[super 2], x[sub i][super 3], [alpha][super 2],
[beta][super [alpha]], [floor x], [floor [alpha]], [ceil a].
[endsect]
@@ -592,7 +592,7 @@ ibeta_inva, and ibeta_invb respectively.]]
[section Images]
These are tricky enough that they warrant their own section.
These are tricky enough that they warrent their own section.
Let's start with a PNG file that's set to 120dpi, it should render at
a sensible size in both html and PDF forms. It should print OK too!
+1 -1
View File
@@ -2,7 +2,7 @@
[/ Examples of using all the Greek and Math symbols defined in HTML4_symbols.qbk]
[/ See http://www.htmlhelp.com/reference/html40/entities/symbols.html]
[/ Also some miscellaneous math characters added to this list - see the end.]
[/ Also some miscellaneous math charaters added to this list - see the end.]
[/ To use, enclose the template name in square brackets.]
+2 -8
View File
@@ -14,10 +14,7 @@
<a href="index.html">
<img src="boost.png" alt="boost.png (6897 bytes)" align="middle" width="277" height="86" border="0"/></a></td>
<td width="337" align="middle">
<h2 style="text-align: center">
{{#is_develop}}Development Snapshot{{/is_develop}}
{{^is_develop}}Release {{version}}{{/is_develop}}
</h2>
<h2 style="text-align: center">Release {{version}}</h2>
</td>
</tr>
</table>
@@ -59,10 +56,7 @@
<h3>Changes in this release</h3>
{{#unreleased_lib_count}}
<p>
{{#is_develop}}This development snapshot{{/is_develop}}
{{^is_develop}}Boost {{minor_release}}{{/is_develop}}
includes {{unreleased_lib_count}} new
<p>The release includes {{unreleased_lib_count}} new
{{#unreleased_library_plural}}libraries{{/unreleased_library_plural}}
{{^unreleased_library_plural}}library{{/unreleased_library_plural}}
({{#unreleased_libs}}{{#index}}, {{/index}}<a href="{{link}}">{{name}}</a>{{/unreleased_libs}})
Submodule libs/beast deleted from 45d4f7f306
Submodule libs/compat deleted from 0008d02a62
Submodule libs/contract deleted from eca93d24b5
Submodule libs/describe deleted from 3047e5a72f
Submodule libs/disjoint_sets added at b322618c09
Submodule libs/headers deleted from 0456900fad
Submodule libs/histogram deleted from a29729e668
Submodule libs/hof deleted from 814f2be286
+1 -1
Submodule libs/io updated: 83e927f998...00ef24c843
Submodule libs/json deleted from a07e38be41
Submodule libs/lambda2 deleted from 62815a69bf
Submodule libs/leaf deleted from 3199f47578

Some files were not shown because too many files have changed in this diff Show More