forked from boostorg/predef
Compare commits
86 Commits
boost-1.64
...
pr/add-cma
Author | SHA1 | Date | |
---|---|---|---|
d52ab32466 | |||
73d7b4f66f | |||
29095cefd9 | |||
fc99bc29cb | |||
4bc7cc02ed | |||
094ac2ffdd | |||
13de873d87 | |||
2e65c250f5 | |||
a2608f26a3 | |||
7e31244f01 | |||
6fea8a4b90 | |||
fee815d6d7 | |||
2e35ba95c8 | |||
cb4f8140f1 | |||
f2de8d8211 | |||
a340a52605 | |||
48d9231a1b | |||
eb682657a2 | |||
c53294180d | |||
9ead140e5b | |||
d33798214d | |||
f862009841 | |||
d58fcca2d5 | |||
aa94d69718 | |||
62a50d3892 | |||
32d4581c16 | |||
92881c4c7a | |||
07df9dd360 | |||
d8f410b4d0 | |||
759400b413 | |||
560ff5298e | |||
75b04d80e7 | |||
bb82002af6 | |||
5d8818ddcb | |||
11569d270c | |||
c8c0134926 | |||
c37ef8b959 | |||
aba0bb4470 | |||
02d09e78b6 | |||
7c0c1f2cb0 | |||
d7bad38b5d | |||
9e73c55298 | |||
7a4ca9dc90 | |||
e8681a9b37 | |||
9e31c6455c | |||
0bccaa9ead | |||
c8c26821b9 | |||
5e8f5d5a4b | |||
74f88005cc | |||
4a230ebe85 | |||
e62a9c68b1 | |||
e31d12f25d | |||
2bba31c5f4 | |||
e87cef64fe | |||
6f8a9ae440 | |||
a7cdea8faf | |||
1c0b55c2f9 | |||
0ab200d19e | |||
7c17b932e4 | |||
de79c6d341 | |||
7c99dfbbd5 | |||
284cde95a2 | |||
bca18299d2 | |||
aa4604a3bd | |||
ba45bd73f3 | |||
ada62932d0 | |||
6a24a3a4bb | |||
9afb15401b | |||
0d9d5591da | |||
db499c07df | |||
9f6191e0bc | |||
4c822c49c2 | |||
f109e20ad1 | |||
d81ab5cc34 | |||
cda33c33d9 | |||
6dfdf9d4dd | |||
5e76979e05 | |||
541ec7edef | |||
87c4de2da2 | |||
693e973635 | |||
77c66456dc | |||
43758299bc | |||
ec6c26ef68 | |||
0f86c9b95e | |||
523e866076 | |||
0bb6e754cb |
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,2 +1,6 @@
|
||||
/bin
|
||||
/boost-build.jam
|
||||
bin
|
||||
boost-build.jam
|
||||
project-config.jam
|
||||
*.pyc
|
||||
.vscode/settings.json
|
||||
.vscode/ipch
|
||||
|
6
.project
6
.project
@ -5,7 +5,13 @@
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.python.pydev.PyDevBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.python.pydev.pythonNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
5
.pydevproject
Normal file
5
.pydevproject
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?eclipse-pydev version="1.0"?><pydev_project>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property>
|
||||
</pydev_project>
|
98
.travis.yml
98
.travis.yml
@ -1,98 +0,0 @@
|
||||
# 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.
|
||||
|
||||
# Setting up notifications like this is optional as the default behavior
|
||||
# of Travis is to notify the commiter of problems. But setting a specific
|
||||
# recipient this way ensures you get all the communications about the
|
||||
# builds.
|
||||
notifications:
|
||||
email:
|
||||
recipients:
|
||||
- grafikrobot@gmail.com
|
||||
|
||||
# For now the CI scripts only support the two main branches available
|
||||
# on the boost super-project.
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
|
||||
# We specify a generic language instead of C++ as Travis sets up
|
||||
# additional environment vars that point to its default toolset
|
||||
# instead of the one we install. The extra env doesn't interfere,
|
||||
# but at the same time it's misleading. So to avoid confusion and
|
||||
# possible unseen side effects we stick with no C++ default setup.
|
||||
language: generic
|
||||
|
||||
# Speficy the default as Linux here, to avoid duplication in the matrix
|
||||
# below. We use Trausty as that's the latest we can use. And it's better
|
||||
# supported by the whole range of C++ toolsets we like to test on.
|
||||
dist: trusty
|
||||
os: linux
|
||||
|
||||
# Because we install our own toolsets and other software we need
|
||||
# to run the sudo support.
|
||||
sudo: required
|
||||
|
||||
# Travis has a long standing bug with their rather complicated
|
||||
# build matrix evaluation that causes empty jobs to be created.
|
||||
# This global matrix entry in combination with the exclusion
|
||||
# below works around that bug. This is the suggested fix from
|
||||
# the Travis support people.
|
||||
env:
|
||||
matrix:
|
||||
- TRAVIS_EMPTY_JOB_WORKAROUND=true
|
||||
|
||||
# This lists all the toolsets we will test with the Boost CI
|
||||
# scripts. Predef needs to check all of them as its job is to
|
||||
# distiguish between all of them. For other libraries you would
|
||||
# want to limit the list to the toolsets that are important
|
||||
# for that.
|
||||
matrix:
|
||||
exclude:
|
||||
- env: TRAVIS_EMPTY_JOB_WORKAROUND=true
|
||||
include:
|
||||
- env: TOOLSET=clang-3.4
|
||||
- env: TOOLSET=clang-3.5
|
||||
- env: TOOLSET=clang-3.6
|
||||
- env: TOOLSET=clang-3.7
|
||||
- env: TOOLSET=clang-3.8
|
||||
- env: TOOLSET=clang-3.9
|
||||
- env: TOOLSET=gcc-4.7
|
||||
- env: TOOLSET=gcc-4.8
|
||||
- env: TOOLSET=gcc-4.9
|
||||
- env: TOOLSET=gcc-5
|
||||
- env: TOOLSET=gcc-6
|
||||
- env: TOOLSET=xcode-6.1
|
||||
os: osx
|
||||
- env: TOOLSET=xcode-6.4
|
||||
os: osx
|
||||
osx_image: xcode6.4
|
||||
- env: TOOLSET=xcode-7.3
|
||||
os: osx
|
||||
osx_image: xcode7.3
|
||||
- env: TOOLSET=xcode-8.0
|
||||
os: osx
|
||||
osx_image: xcode8
|
||||
|
||||
# These are the standard steps to bootstrap the Boost CI scripts
|
||||
# and to forward the actions to the scripts.
|
||||
before_install:
|
||||
# Fetch the scripts to do the actual building/testing.
|
||||
- |
|
||||
wget "https://raw.githubusercontent.com/boostorg/regression/develop/ci/src/ci_boost_common.py" -P ..
|
||||
wget "https://raw.githubusercontent.com/boostorg/regression/develop/ci/src/ci_boost_library_test.py" -P ..
|
||||
|
||||
install: python "${TRAVIS_BUILD_DIR}/../ci_boost_library_test.py" install
|
||||
before_script: python "${TRAVIS_BUILD_DIR}/../ci_boost_library_test.py" before_script
|
||||
script: python "${TRAVIS_BUILD_DIR}/../ci_boost_library_test.py" script
|
||||
before_cache: python "${TRAVIS_BUILD_DIR}/../ci_boost_library_test.py" before_cache
|
||||
after_success: python "${TRAVIS_BUILD_DIR}/../ci_boost_library_test.py" after_success
|
||||
after_failure: python "${TRAVIS_BUILD_DIR}/../ci_boost_library_test.py" after_failure
|
||||
after_script: python "${TRAVIS_BUILD_DIR}/../ci_boost_library_test.py" after_script
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/boostorg/boost
|
46
CMakeLists.txt
Normal file
46
CMakeLists.txt
Normal file
@ -0,0 +1,46 @@
|
||||
# Copyright Mike Dev 2018
|
||||
# Copyright Rene Rivera 2018
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
# NOTE:
|
||||
# CMake support for Boost.Predef is currently experimental at best and the
|
||||
# interface is likely to change in the future
|
||||
#
|
||||
# This file provides minimal cmake support (no unit-tests,
|
||||
# no installation) for integration into a "host" cmake project
|
||||
# via the "add_subdirectory( <path-to-boost-predef> )" command.
|
||||
#
|
||||
# Other cmake targets can then use the public target name
|
||||
# "Boost::predef" in order to express their dependency
|
||||
# on this library. I.e:
|
||||
#
|
||||
# target_link_libraries( <my-exe/lib> PUBLIC Boost::predef )
|
||||
|
||||
# Only need the basic minimum of project, add_library, and
|
||||
# target_include_directories commands.
|
||||
# We support 3.0, but prefer 3.16 policies and behavior
|
||||
cmake_minimum_required( VERSION 3.0...3.16 )
|
||||
|
||||
# Keep VERSION empty when outside the superproject, as that's a pita to
|
||||
# keep up to date with the version header. And don't set LANGUAGES as we
|
||||
# are multi-language and header only, so it's irrelevant.
|
||||
project( BoostPredef VERSION "${BOOST_SUPERPROJECT_VERSION}" )
|
||||
|
||||
# Simple INTERFACE, and header only, library target.
|
||||
add_library( boost_predef INTERFACE )
|
||||
|
||||
# The only usage requirement is include dir for consumers.
|
||||
target_include_directories( boost_predef INTERFACE include )
|
||||
|
||||
# Add an alias to be compatible with consumers that may have used the
|
||||
# FindBoost script.
|
||||
add_library( Boost::predef ALIAS boost_predef )
|
||||
|
||||
if(BOOST_SUPERPROJECT_VERSION)
|
||||
|
||||
include(BoostInstall)
|
||||
boost_install(TARGETS boost_predef HEADER_DIRECTORY include/)
|
||||
|
||||
endif()
|
72
appveyor.yml
72
appveyor.yml
@ -1,72 +0,0 @@
|
||||
# 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.
|
||||
|
||||
# Set up notifications so that the maintainers of the library get
|
||||
# build status messages.
|
||||
notifications:
|
||||
- provider: Email
|
||||
to:
|
||||
- grafikrobot@gmail.com
|
||||
on_build_status_changed: true
|
||||
|
||||
# This lists all the toolsets we will test with the Boost CI
|
||||
# scripts. Predef needs to check all of them as its job is to
|
||||
# distiguish between all of them. For other libraries you would
|
||||
# want to limit the list to the toolsets that are important
|
||||
# for that.
|
||||
#
|
||||
# This also includes setting up how to create the cache. We
|
||||
# opt for slightly better compression and solid archives.
|
||||
# As we have a lot of files in the boost tree which is what
|
||||
# we are putting in the cache.
|
||||
environment:
|
||||
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: -t7z -m0=lzma2 -mx=3
|
||||
matrix:
|
||||
- TOOLSET: vs-2008
|
||||
platform: 32
|
||||
- TOOLSET: vs-2010
|
||||
platform: 32
|
||||
- TOOLSET: vs-2012
|
||||
platform: 32
|
||||
- TOOLSET: vs-2013
|
||||
platform: 32
|
||||
- TOOLSET: vs-2013
|
||||
platform: 64
|
||||
- TOOLSET: vs-2015
|
||||
platform: 32
|
||||
- TOOLSET: vs-2015
|
||||
platform: 64
|
||||
|
||||
# We can also set up configurations for testing which map to
|
||||
# the b2 build variants.
|
||||
configuration:
|
||||
- debug
|
||||
- release
|
||||
|
||||
# These are the standard steps to bootstrap the Boost CI scripts
|
||||
# and to forward the actions to the scripts.
|
||||
init:
|
||||
# Fetch the scripts to do the actual building/testing.
|
||||
- cd %APPVEYOR_BUILD_FOLDER%/..
|
||||
- appveyor DownloadFile "https://raw.githubusercontent.com/boostorg/regression/develop/ci/src/ci_boost_common.py"
|
||||
- appveyor DownloadFile "https://raw.githubusercontent.com/boostorg/regression/develop/ci/src/ci_boost_library_test.py"
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
install: python ../ci_boost_library_test.py install
|
||||
before_build: python ../ci_boost_library_test.py before_build
|
||||
build_script: python ../ci_boost_library_test.py build_script
|
||||
after_build: python ../ci_boost_library_test.py after_build
|
||||
before_test: python ../ci_boost_library_test.py before_test
|
||||
test_script: python ../ci_boost_library_test.py test_script
|
||||
after_test: python ../ci_boost_library_test.py after_test
|
||||
on_success: python ../ci_boost_library_test.py on_success
|
||||
on_failure: python ../ci_boost_library_test.py on_failure
|
||||
on_finish: python ../ci_boost_library_test.py on_finish
|
||||
|
||||
# We cache the boost repo, which is cleaned before caching.
|
||||
# This saves some time as cloning the git submodules fresh
|
||||
# takes a few minutes on Windows.
|
||||
cache:
|
||||
- C:\projects\boostorg\boost -> appveyor.yml
|
203
azure-pipelines.yml
Normal file
203
azure-pipelines.yml
Normal file
@ -0,0 +1,203 @@
|
||||
# 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 2019.
|
||||
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- develop
|
||||
- master
|
||||
- feature/*
|
||||
pr:
|
||||
branches:
|
||||
include:
|
||||
- develop
|
||||
|
||||
variables:
|
||||
AZP: 1
|
||||
AZP_REPO_DIR: $(Build.Repository.LocalPath)
|
||||
AZP_BRANCH: $(Build.SourceBranch)
|
||||
AZP_COMMIT: $(Build.SourceVersion)
|
||||
AZP_REPO: $(Build.Repository.Name)
|
||||
AZP_PULL_REQUEST: $(System.PullRequest.PullRequestNumber)
|
||||
|
||||
jobs:
|
||||
|
||||
- job: 'Linux'
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
strategy:
|
||||
matrix:
|
||||
GCC 8 (GNU):
|
||||
TOOLSET: gcc-8
|
||||
CXXSTD: 03,11,14,17,2a
|
||||
CXXDIALECT: gnu
|
||||
GCC 8 (ISO):
|
||||
TOOLSET: gcc-8
|
||||
CXXSTD: 03,11,14,17,2a
|
||||
GCC 7:
|
||||
TOOLSET: gcc-7
|
||||
GCC 6:
|
||||
TOOLSET: gcc-6
|
||||
GCC 5:
|
||||
TOOLSET: gcc-5
|
||||
GCC 4.9:
|
||||
TOOLSET: gcc-4.9
|
||||
GCC 4.8:
|
||||
TOOLSET: gcc-4.8
|
||||
GCC 4.7:
|
||||
TOOLSET: gcc-4.7
|
||||
Clang 8:
|
||||
TOOLSET: clang-8
|
||||
Clang 7:
|
||||
TOOLSET: clang-7
|
||||
Clang 6:
|
||||
TOOLSET: clang-6.0
|
||||
Clang 5:
|
||||
TOOLSET: clang-5.0
|
||||
Clang 4:
|
||||
TOOLSET: clang-4.0
|
||||
Clang 3.9:
|
||||
TOOLSET: clang-3.9
|
||||
Clang 3.8:
|
||||
TOOLSET: clang-3.8
|
||||
Clang 3.7:
|
||||
TOOLSET: clang-3.7
|
||||
Clang 3.6:
|
||||
TOOLSET: clang-3.6
|
||||
Clang 3.5:
|
||||
TOOLSET: clang-3.5
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
- script: python tools/ci/library_test.py install
|
||||
failOnStderr: false
|
||||
displayName: Install
|
||||
- script: python tools/ci/library_test.py script
|
||||
failOnStderr: false
|
||||
displayName: Test
|
||||
|
||||
- job: 'macOS'
|
||||
strategy:
|
||||
matrix:
|
||||
Xcode 10.1:
|
||||
TOOLSET: xcode-10.1
|
||||
XCODE_APP: /Applications/Xcode_10.1.app
|
||||
VM_IMAGE: 'macOS-10.14'
|
||||
Xcode 10.0:
|
||||
TOOLSET: xcode-10.0
|
||||
XCODE_APP: /Applications/Xcode_10.app
|
||||
VM_IMAGE: 'macOS-10.14'
|
||||
Xcode 9.4.1:
|
||||
TOOLSET: xcode-9.4.1
|
||||
XCODE_APP: /Applications/Xcode_9.4.1.app
|
||||
VM_IMAGE: 'macOS-10.13'
|
||||
Xcode 9.4:
|
||||
TOOLSET: xcode-9.4
|
||||
XCODE_APP: /Applications/Xcode_9.4.app
|
||||
VM_IMAGE: 'macOS-10.13'
|
||||
Xcode 9.3.1:
|
||||
TOOLSET: xcode-9.3.1
|
||||
XCODE_APP: /Applications/Xcode_9.3.1.app
|
||||
VM_IMAGE: 'macOS-10.13'
|
||||
Xcode 9.3:
|
||||
TOOLSET: xcode-9.3
|
||||
XCODE_APP: /Applications/Xcode_9.3.app
|
||||
VM_IMAGE: 'macOS-10.13'
|
||||
Xcode 9.2:
|
||||
TOOLSET: xcode-9.2
|
||||
XCODE_APP: /Applications/Xcode_9.2.app
|
||||
VM_IMAGE: 'macOS-10.13'
|
||||
Xcode 9.1:
|
||||
TOOLSET: xcode-9.1
|
||||
XCODE_APP: /Applications/Xcode_9.1.app
|
||||
VM_IMAGE: 'macOS-10.13'
|
||||
Xcode 9.0.1:
|
||||
TOOLSET: xcode-9.0.1
|
||||
XCODE_APP: /Applications/Xcode_9.0.1.app
|
||||
VM_IMAGE: 'macOS-10.13'
|
||||
Xcode 9.0:
|
||||
TOOLSET: xcode-9.0
|
||||
XCODE_APP: /Applications/Xcode_9.app
|
||||
VM_IMAGE: 'macOS-10.13'
|
||||
Xcode 8.3.3:
|
||||
TOOLSET: xcode-8.3
|
||||
XCODE_APP: /Applications/Xcode_8.3.3.app
|
||||
VM_IMAGE: 'macOS-10.13'
|
||||
pool:
|
||||
vmImage: $(VM_IMAGE)
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
- script: sudo xcode-select -switch ${XCODE_APP}
|
||||
failOnStderr: false
|
||||
displayName: Xcode Select
|
||||
- script: python tools/ci/library_test.py install
|
||||
failOnStderr: false
|
||||
displayName: Install
|
||||
- script: python tools/ci/library_test.py script
|
||||
failOnStderr: false
|
||||
displayName: Test
|
||||
|
||||
- job: 'Windows'
|
||||
strategy:
|
||||
matrix:
|
||||
VS 2019:
|
||||
TOOLSET: vs-2019
|
||||
ADDRESS_MODEL: 32,64
|
||||
CXXSTD: 14,latest
|
||||
VM_IMAGE: 'windows-2019'
|
||||
VS 2019 (UWP DESKTOP):
|
||||
TOOLSET: vs-2019
|
||||
ADDRESS_MODEL: 64
|
||||
CXXDEFS: _WIN32_WINNT=0x0A00,WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP
|
||||
VM_IMAGE: 'windows-2019'
|
||||
VS 2019 (UWP PHONE):
|
||||
TOOLSET: vs-2019
|
||||
ADDRESS_MODEL: 64
|
||||
CXXDEFS: _WIN32_WINNT=0x0A00,WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP
|
||||
VM_IMAGE: 'windows-2019'
|
||||
VS 2019 (UWP STORE):
|
||||
TOOLSET: vs-2019
|
||||
ADDRESS_MODEL: 64
|
||||
CXXDEFS: _WIN32_WINNT=0x0A00,WINAPI_FAMILY=WINAPI_FAMILY_PC_APP
|
||||
VM_IMAGE: 'windows-2019'
|
||||
VS 2019 (UWP SERVER):
|
||||
TOOLSET: vs-2019
|
||||
ADDRESS_MODEL: 64
|
||||
CXXDEFS: _WIN32_WINNT=0x0A00,WINAPI_FAMILY=WINAPI_FAMILY_SERVER
|
||||
VM_IMAGE: 'windows-2019'
|
||||
VS 2019 (UWP SYSTEM):
|
||||
TOOLSET: vs-2019
|
||||
ADDRESS_MODEL: 64
|
||||
CXXDEFS: _WIN32_WINNT=0x0A00,WINAPI_FAMILY=WINAPI_FAMILY_SYSTEM
|
||||
VM_IMAGE: 'windows-2019'
|
||||
VS 2017:
|
||||
TOOLSET: vs-2017
|
||||
VM_IMAGE: 'vs2017-win2016'
|
||||
VS 2015:
|
||||
TOOLSET: vs-2015
|
||||
VM_IMAGE: 'vs2015-win2012r2'
|
||||
VS 2013:
|
||||
TOOLSET: vs-2013
|
||||
VM_IMAGE: 'vs2015-win2012r2'
|
||||
MinGW 8.1.0:
|
||||
TOOLSET: mingw-8
|
||||
VM_IMAGE: 'vs2017-win2016'
|
||||
MinGW 8.1.0 (UWP DESKTOP):
|
||||
TOOLSET: mingw-8
|
||||
CXXDEFS: _WIN32_WINNT=0x0A00,WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP
|
||||
VM_IMAGE: 'vs2017-win2016'
|
||||
MinGW 8.1.0 (UWP STORE):
|
||||
TOOLSET: mingw-8
|
||||
CXXDEFS: _WIN32_WINNT=0x0A00,WINAPI_FAMILY=WINAPI_FAMILY_PC_APP
|
||||
VM_IMAGE: 'vs2017-win2016'
|
||||
pool:
|
||||
vmImage: $(VM_IMAGE)
|
||||
steps:
|
||||
- script: python tools/ci/library_test.py install
|
||||
failOnStderr: false
|
||||
displayName: Install
|
||||
- script: python tools/ci/library_test.py script
|
||||
failOnStderr: false
|
||||
displayName: Test
|
39
build.jam
39
build.jam
@ -1,6 +1,43 @@
|
||||
# Copyright Rene Rivera 2014
|
||||
# Copyright Rene Rivera 2014-2019
|
||||
# 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)
|
||||
|
||||
#|
|
||||
This B2 project provides support for using the Predef library externally as
|
||||
a standalone project or by embedding in your B2 project tree. To use
|
||||
externally you would need a `use-project` declaration and to use the
|
||||
project as a dependency where needed:
|
||||
|
||||
----
|
||||
use-project /hash-predef : /path/to/hash-predef/root ;
|
||||
|
||||
exe my_thing : main.cpp : <dependency>/hash-predef ;
|
||||
----
|
||||
|
||||
To use in your project tree you would only need to place the Predef tree
|
||||
in a subdirectory and reference the project location as a dependency where
|
||||
needed.
|
||||
|
||||
----
|
||||
exe my_thin : main.cpp : <dependency>libs/hash-predef ;
|
||||
----
|
||||
|#
|
||||
|
||||
import project ;
|
||||
|
||||
path-constant BOOST_PREDEF_ROOT : . ;
|
||||
path-constant BOOST_PREDEF_INCLUDE : include ;
|
||||
constant PREDEF_DIST : boost ;
|
||||
|
||||
project /boost/predef
|
||||
: usage-requirements
|
||||
<include>$(BOOST_PREDEF_INCLUDE) ;
|
||||
|
||||
if [ project.is-jamroot-module $(__name__) ]
|
||||
{
|
||||
local attributes = [ project.attributes $(__name__) ] ;
|
||||
$(attributes).set "build-dir" : bin ;
|
||||
}
|
||||
|
||||
alias libs ;
|
||||
|
@ -1,5 +1,5 @@
|
||||
[/
|
||||
Copyright 2014-2016 Rene Rivera
|
||||
Copyright 2014-2019 Rene Rivera
|
||||
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)
|
||||
@ -7,6 +7,51 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
[section History]
|
||||
|
||||
[heading 1.11]
|
||||
|
||||
* Add `BOOST_ARCH_RISCV`. (from Andreas Schwab)
|
||||
* Add RISC-V endian detection. (from Thomas Petazzoni)
|
||||
|
||||
[heading 1.10]
|
||||
|
||||
* Fix bad include of sub-BSD os headers from main BSD header.
|
||||
* Fix use of deprecated `TARGET_IPHONE_SIMULATOR` instead of newer
|
||||
`TARGET_OS_SIMULATOR`.
|
||||
* Add `BOOST_PLAT_ANDROID` to resolve conflict between Linux and Android
|
||||
OS predefs. The `BOOST_OS_ANDROID` predef is now deprecated and will be
|
||||
removed in a future release.
|
||||
* Add support for consuming Predef as a CMake project.
|
||||
* Add support for consuming Predef as a standalone B2 project.
|
||||
|
||||
[heading 1.9]
|
||||
|
||||
* Fixes for `BOOST_COMP_NVCC*` predefs. (from Benjamin Worpitz)
|
||||
* Add specific version information for Cygwin OS predef. (from James E. King III)
|
||||
|
||||
[heading 1.8]
|
||||
|
||||
* Add support for __ARM_ARCH macro. (from Tim Blechmann)
|
||||
* Add detection for PTX architecture. (from Benjamin Worpitz)
|
||||
* Add nvcc compiler detection. (from Benjamin Worpitz)
|
||||
* Add support for detecting CUDA. (from Benjamin Worpitz)
|
||||
* Remove reference to obsolete BOOST_ARCH_AMD64. (from Peter Kolbus)
|
||||
|
||||
[heading 1.7]
|
||||
|
||||
* Fix BOOST_ARCH_PARISK/BOOST_ARCH_PARISC typo.
|
||||
* Improved Windows Universal Platform detection. (from James E. King, III)
|
||||
* Add detection for CloudABI with cloudlibc. (from James E. King, III)
|
||||
|
||||
[heading 1.6]
|
||||
|
||||
* Fix Intel C/C++ version 9999 detection to be 12.1.0.
|
||||
* Addition of `BOOST_PREDEF_WORKAROUND` and `BOOST_PREDEF_TESTED_AT` macros
|
||||
for defect workarounds and detection.
|
||||
* Add ARM64 MSVC SIMD detection. (from Minmin Gong)
|
||||
* Add detection of iOS simulator vs device as a platform choice. (from Ruslan
|
||||
Baratov)
|
||||
* Fix MinGW incorrect header guard. (from Ruslan Baratov)
|
||||
|
||||
[heading 1.5]
|
||||
|
||||
* Fix Intel C/C++ compiler version specification.
|
||||
|
@ -1,8 +1,8 @@
|
||||
[article Boost.Predef
|
||||
[quickbook 1.7]
|
||||
[version 1.5]
|
||||
[version 1.10]
|
||||
[authors [Rivera, Rene]]
|
||||
[copyright 2005-2016 Rene Rivera]
|
||||
[copyright 2005-2019 Rene Rivera]
|
||||
[copyright 2015 Charly Chevalier]
|
||||
[copyright 2015 Joel Falcou]
|
||||
[purpose Identification and specification of predefined macros.]
|
||||
@ -114,12 +114,8 @@ done:
|
||||
* Additionally, even if there is no auto-configure style option.. It would be
|
||||
good to add optionally included headers so that user can get consistent
|
||||
version number definitions for libraries they use.
|
||||
* Having a consistent set of version number definitions opens the door to
|
||||
improving the user level syntax of libraries that do checks against version
|
||||
numbers. Specifically Boost Config's `BOOST_WORKAROUND` macro would benefit
|
||||
from a more readable syntax. As would the `BOOST_TESTED_AT` detail macro.
|
||||
* And obviously there's lots of work to do in reformulating the existing
|
||||
Boost libraries to use the Predef library once it's accepted.
|
||||
Boost libraries to use the Predef library.
|
||||
* And there's the continuing work of adding definitions for present and
|
||||
future compilers, platforms, architectures, languages, and libraries.
|
||||
|
||||
@ -239,7 +235,7 @@ commonly emulated by other compilers by defining the same base macros. To
|
||||
account for this detection headers are allowed to define `*_EMULATED` predefs
|
||||
when this situation is detected. The emulated predefs will be set to the
|
||||
version number of the detection instead of the regular predef macro for that
|
||||
detection. For example MSVC will set `BOOST_COMP_MSVC_EMULATED` but not set `BOOST_COM_MSVC`, and it will also set `BOOST_COMP_MSVC_AVAILABLE`.
|
||||
detection. For example MSVC will set `BOOST_COMP_MSVC_EMULATED` but not set `BOOST_COMP_MSVC`, and it will also set `BOOST_COMP_MSVC_AVAILABLE`.
|
||||
|
||||
[heading Using the `BOOST_VERSION_NUMBER` macro]
|
||||
|
||||
@ -405,7 +401,7 @@ We also need to provide the `*_AVAILABLE` versions of the predef.
|
||||
And for convenience we also want to provide a `*_NAME` macro:
|
||||
|
||||
``
|
||||
#define BOOST_catagory_tag_NAME "Name"
|
||||
#define BOOST_category_tag_NAME "Name"
|
||||
``
|
||||
|
||||
The testing of the predef macros is automated to generate checks for all
|
||||
@ -511,7 +507,7 @@ uses a simple 3-digit version macro (M,N,P). It can be decomposed
|
||||
and defined as:
|
||||
|
||||
``
|
||||
#define BOOST_CCOMP_EDG BOOST_PREDEF_MAKE_N_N_N(__EDG_VERSION__)
|
||||
#define BOOST_COMP_EDG BOOST_PREDEF_MAKE_N_N_N(__EDG_VERSION__)
|
||||
``
|
||||
|
||||
The decomposition macros are split into three types: decimal
|
||||
|
@ -1,5 +1,5 @@
|
||||
[/
|
||||
Copyright 2014 Rene Rivera
|
||||
Copyright 2014-2017 Rene Rivera
|
||||
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)
|
||||
@ -8,6 +8,5 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
[section To Do]
|
||||
|
||||
* Improve reference documentation.
|
||||
* Provide BOOST_WORKAROUND style macros for public use.
|
||||
|
||||
[endsect]
|
||||
|
@ -19,7 +19,9 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#include <boost/predef/architecture/mips.h>
|
||||
#include <boost/predef/architecture/parisc.h>
|
||||
#include <boost/predef/architecture/ppc.h>
|
||||
#include <boost/predef/architecture/ptx.h>
|
||||
#include <boost/predef/architecture/pyramid.h>
|
||||
#include <boost/predef/architecture/riscv.h>
|
||||
#include <boost/predef/architecture/rs6k.h>
|
||||
#include <boost/predef/architecture/sparc.h>
|
||||
#include <boost/predef/architecture/superh.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2008-2015
|
||||
Copyright Rene Rivera 2008-2019
|
||||
Copyright Franz Detro 2014
|
||||
Copyright (c) Microsoft Corporation 2014
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
@ -21,28 +21,68 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__arm__`] [__predef_detection__]]
|
||||
[[`__arm64`] [__predef_detection__]]
|
||||
[[`__thumb__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH`] [__predef_detection__]]
|
||||
[[`__TARGET_ARCH_ARM`] [__predef_detection__]]
|
||||
[[`__TARGET_ARCH_THUMB`] [__predef_detection__]]
|
||||
[[`_M_ARM`] [__predef_detection__]]
|
||||
[[`__arm__`] [__predef_detection__]]
|
||||
[[`__arm64`] [__predef_detection__]]
|
||||
[[`__thumb__`] [__predef_detection__]]
|
||||
[[`_M_ARM64`] [__predef_detection__]]
|
||||
[[`__aarch64__`] [__predef_detection__]]
|
||||
[[`__AARCH64EL__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_7__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_7A__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_7R__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_7M__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_6K__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_6Z__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_6KZ__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_6T2__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_5TE__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_5TEJ__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_4T__`] [__predef_detection__]]
|
||||
[[`__ARM_ARCH_4__`] [__predef_detection__]]
|
||||
|
||||
[[`__arm64`] [8.0.0]]
|
||||
[[`__ARM_ARCH`] [V.0.0]]
|
||||
[[`__TARGET_ARCH_ARM`] [V.0.0]]
|
||||
[[`__TARGET_ARCH_THUMB`] [V.0.0]]
|
||||
[[`_M_ARM`] [V.0.0]]
|
||||
[[`__arm64`] [8.0.0]]
|
||||
[[`_M_ARM64`] [8.0.0]]
|
||||
[[`__aarch64__`] [8.0.0]]
|
||||
[[`__AARCH64EL__`] [8.0.0]]
|
||||
[[`__ARM_ARCH_7__`] [7.0.0]]
|
||||
[[`__ARM_ARCH_7A__`] [7.0.0]]
|
||||
[[`__ARM_ARCH_7R__`] [7.0.0]]
|
||||
[[`__ARM_ARCH_7M__`] [7.0.0]]
|
||||
[[`__ARM_ARCH_6K__`] [6.0.0]]
|
||||
[[`__ARM_ARCH_6Z__`] [6.0.0]]
|
||||
[[`__ARM_ARCH_6KZ__`] [6.0.0]]
|
||||
[[`__ARM_ARCH_6T2__`] [6.0.0]]
|
||||
[[`__ARM_ARCH_5TE__`] [5.0.0]]
|
||||
[[`__ARM_ARCH_5TEJ__`] [5.0.0]]
|
||||
[[`__ARM_ARCH_4T__`] [4.0.0]]
|
||||
[[`__ARM_ARCH_4__`] [4.0.0]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__arm__) || defined(__arm64) || defined(__thumb__) || \
|
||||
defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || \
|
||||
defined(_M_ARM)
|
||||
#if \
|
||||
defined(__ARM_ARCH) || defined(__TARGET_ARCH_ARM) || \
|
||||
defined(__TARGET_ARCH_THUMB) || defined(_M_ARM) || \
|
||||
defined(__arm__) || defined(__arm64) || defined(__thumb__) || \
|
||||
defined(_M_ARM64) || defined(__aarch64__) || defined(__AARCH64EL__) || \
|
||||
defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \
|
||||
defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || \
|
||||
defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \
|
||||
defined(__ARM_ARCH_6KZ__) || defined(__ARM_ARCH_6T2__) || \
|
||||
defined(__ARM_ARCH_5TE__) || defined(__ARM_ARCH_5TEJ__) || \
|
||||
defined(__ARM_ARCH_4T__) || defined(__ARM_ARCH_4__)
|
||||
# undef BOOST_ARCH_ARM
|
||||
# if !defined(BOOST_ARCH_ARM) && defined(__arm64)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0)
|
||||
# if !defined(BOOST_ARCH_ARM) && defined(__ARM_ARCH)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__ARM_ARCH,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_ARM)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_ARM,0,0)
|
||||
@ -53,6 +93,29 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
# if !defined(BOOST_ARCH_ARM) && defined(_M_ARM)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(_M_ARM,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && ( \
|
||||
defined(__arm64) || defined(_M_ARM64) || defined(__aarch64__) || \
|
||||
defined(__AARCH64EL__) )
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && ( \
|
||||
defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \
|
||||
defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) )
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(7,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && ( \
|
||||
defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \
|
||||
defined(__ARM_ARCH_6KZ__) || defined(__ARM_ARCH_6T2__) )
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(6,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && ( \
|
||||
defined(__ARM_ARCH_5TE__) || defined(__ARM_ARCH_5TEJ__) )
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(5,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && ( \
|
||||
defined(__ARM_ARCH_4T__) || defined(__ARM_ARCH_4__) )
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(4,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
|
@ -12,7 +12,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_ARCH_PARISK`]
|
||||
[heading `BOOST_ARCH_PARISC`]
|
||||
|
||||
[@http://en.wikipedia.org/wiki/PA-RISC_family HP/PA RISC] architecture.
|
||||
|
||||
|
44
include/boost/predef/architecture/ptx.h
Normal file
44
include/boost/predef/architecture/ptx.h
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
Copyright Benjamin Worpitz 2018
|
||||
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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_ARCHITECTURE_PTX_H
|
||||
#define BOOST_PREDEF_ARCHITECTURE_PTX_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_ARCH_PTX`]
|
||||
|
||||
[@https://en.wikipedia.org/wiki/Parallel_Thread_Execution PTX] architecture.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__CUDA_ARCH__`] [__predef_detection__]]
|
||||
|
||||
[[`__CUDA_ARCH__`] [V.R.0]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_ARCH_PTX BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__CUDA_ARCH__)
|
||||
# undef BOOST_ARCH_PTX
|
||||
# define BOOST_ARCH_PTX BOOST_PREDEF_MAKE_10_VR0(__CUDA_ARCH__)
|
||||
#endif
|
||||
|
||||
#if BOOST_ARCH_PTX
|
||||
# define BOOST_ARCH_PTX_AVAILABLE
|
||||
#endif
|
||||
|
||||
#define BOOST_ARCH_PTX_NAME "PTX"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PTX,BOOST_ARCH_PTX_NAME)
|
42
include/boost/predef/architecture/riscv.h
Normal file
42
include/boost/predef/architecture/riscv.h
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
Copyright Andreas Schwab 2019
|
||||
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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_ARCHITECTURE_RISCV_H
|
||||
#define BOOST_PREDEF_ARCHITECTURE_RISCV_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_ARCH_RISCV`]
|
||||
|
||||
[@http://en.wikipedia.org/wiki/RISC-V] architecture.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__riscv`] [__predef_detection__]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_ARCH_RISCV BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__riscv)
|
||||
# undef BOOST_ARCH_RISCV
|
||||
# define BOOST_ARCH_RISCV BOOST_VERSION_NUMBER_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if BOOST_ARCH_RISCV
|
||||
# define BOOST_ARCH_RISCV_AVAILABLE
|
||||
#endif
|
||||
|
||||
#define BOOST_ARCH_RISCV_NAME "RISC-V"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_RISCV,BOOST_ARCH_RISCV_NAME)
|
@ -32,6 +32,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#include <boost/predef/compiler/metrowerks.h>
|
||||
#include <boost/predef/compiler/microtec.h>
|
||||
#include <boost/predef/compiler/mpw.h>
|
||||
#include <boost/predef/compiler/nvcc.h>
|
||||
#include <boost/predef/compiler/palm.h>
|
||||
#include <boost/predef/compiler/pgi.h>
|
||||
#include <boost/predef/compiler/sgi_mipspro.h>
|
||||
|
@ -38,7 +38,7 @@ Version number available as major, minor, and patch.
|
||||
# define BOOST_COMP_DEC_DETECTION BOOST_PREDEF_MAKE_10_VVRR0PP00(__DECC_VER)
|
||||
# endif
|
||||
# if !defined(BOOST_COMP_DEC_DETECTION)
|
||||
# define BOOST_COM_DEC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# define BOOST_COMP_DEC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2008-2015
|
||||
Copyright Rene Rivera 2008-2017
|
||||
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)
|
||||
@ -34,6 +34,13 @@ Version number available as major, minor, and patch.
|
||||
|
||||
#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || \
|
||||
defined(__ECC)
|
||||
/*`
|
||||
[note Because of an Intel mistake in the release version numbering when
|
||||
`__INTEL_COMPILER` is `9999` it is detected as version 12.1.0.]
|
||||
*/
|
||||
# if !defined(BOOST_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 9999)
|
||||
# define BOOST_COMP_INTEL_DETECTION BOOST_VERSION_NUMBER(12,1,0)
|
||||
# endif
|
||||
# if !defined(BOOST_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE)
|
||||
# define BOOST_COMP_INTEL_DETECTION BOOST_VERSION_NUMBER( \
|
||||
BOOST_VERSION_NUMBER_MAJOR(BOOST_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER)), \
|
||||
|
73
include/boost/predef/compiler/nvcc.h
Normal file
73
include/boost/predef/compiler/nvcc.h
Normal file
@ -0,0 +1,73 @@
|
||||
/*
|
||||
Copyright Benjamin Worpitz 2018
|
||||
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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_COMPILER_NVCC_H
|
||||
#define BOOST_PREDEF_COMPILER_NVCC_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_COMP_NVCC`]
|
||||
|
||||
[@https://en.wikipedia.org/wiki/NVIDIA_CUDA_Compiler NVCC] compiler.
|
||||
Version number available as major, minor, and patch beginning with version 7.5.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__NVCC__`] [__predef_detection__]]
|
||||
|
||||
[[`__CUDACC_VER_MAJOR__`, `__CUDACC_VER_MINOR__`, `__CUDACC_VER_BUILD__`] [V.R.P]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_COMP_NVCC BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__NVCC__)
|
||||
# if !defined(__CUDACC_VER_MAJOR__) || !defined(__CUDACC_VER_MINOR__) || !defined(__CUDACC_VER_BUILD__)
|
||||
# define BOOST_COMP_NVCC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# else
|
||||
# define BOOST_COMP_NVCC_DETECTION BOOST_VERSION_NUMBER(__CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, __CUDACC_VER_BUILD__)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_COMP_NVCC_DETECTION
|
||||
/*
|
||||
Always define BOOST_COMP_NVCC instead of BOOST_COMP_NVCC_EMULATED
|
||||
The nvcc compilation process is somewhat special as can be read here:
|
||||
https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#cuda-compilation-trajectory
|
||||
The nvcc compiler precompiles the input two times. Once for the device code
|
||||
being compiled by the cicc device compiler and once for the host code
|
||||
compiled by the real host compiler. NVCC uses gcc/clang/msvc/...
|
||||
depending on the host compiler being set on the command line.
|
||||
|
||||
Predef (as a preprocessor only lib) detects the one doing the preprocessing
|
||||
as compiler and expects it to be the one doing the real compilation.
|
||||
This is not true for NVCC which is only doing the preprocessing and which
|
||||
is using another compiler for parts of its work. So for NVCC it should be
|
||||
allowed to set BOOST_COMP_NVCC additionally to the already detected host
|
||||
compiler because both is true: It is gcc/clang/... compiling the code, but it
|
||||
is also NVCC doing the preprocessing and adding some other quirks you may
|
||||
want to detect.
|
||||
|
||||
This behavior is similar to what boost config is doing in `select_compiler_config.hpp`.
|
||||
There the NVCC detection is not handled as a real compiler (part of the
|
||||
#if-#elif) but as additional option before the real compiler.
|
||||
*/
|
||||
# undef BOOST_COMP_NVCC
|
||||
# define BOOST_COMP_NVCC BOOST_COMP_NVCC_DETECTION
|
||||
# define BOOST_COMP_NVCC_AVAILABLE
|
||||
# include <boost/predef/detail/comp_detected.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_COMP_NVCC_NAME "NVCC"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_NVCC,BOOST_COMP_NVCC_NAME)
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2013
|
||||
Copyright Rene Rivera 2013-2018
|
||||
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)
|
||||
@ -8,6 +8,8 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_PREDEF_DETAIL_ENDIAN_COMPAT_H
|
||||
#define BOOST_PREDEF_DETAIL_ENDIAN_COMPAT_H
|
||||
|
||||
#pragma message("The use of BOOST_*_ENDIAN and BOOST_BYTE_ORDER is deprecated. Please include <boost/predef/other/endian.h> and use BOOST_ENDIAN_*_BYTE instead")
|
||||
|
||||
#include <boost/predef/other/endian.h>
|
||||
|
||||
#if BOOST_ENDIAN_BIG_BYTE
|
||||
|
@ -24,6 +24,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
[[`__ARM_NEON__`] [__predef_detection__]]
|
||||
[[`__aarch64__`] [__predef_detection__]]
|
||||
[[`_M_ARM`] [__predef_detection__]]
|
||||
[[`_M_ARM64`] [__predef_detection__]]
|
||||
]
|
||||
|
||||
[table
|
||||
@ -32,6 +33,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
[[`__ARM_NEON__`] [BOOST_HW_SIMD_ARM_NEON_VERSION]]
|
||||
[[`__aarch64__`] [BOOST_HW_SIMD_ARM_NEON_VERSION]]
|
||||
[[`_M_ARM`] [BOOST_HW_SIMD_ARM_NEON_VERSION]]
|
||||
[[`_M_ARM64`] [BOOST_HW_SIMD_ARM_NEON_VERSION]]
|
||||
]
|
||||
|
||||
*/
|
||||
@ -39,7 +41,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#undef BOOST_HW_SIMD_ARM
|
||||
#if !defined(BOOST_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM))
|
||||
#if !defined(BOOST_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM) || defined (_M_ARM64))
|
||||
# define BOOST_HW_SIMD_ARM BOOST_HW_SIMD_ARM_NEON_VERSION
|
||||
#endif
|
||||
|
||||
|
@ -13,5 +13,6 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#include <boost/predef/language/stdc.h>
|
||||
#include <boost/predef/language/stdcpp.h>
|
||||
#include <boost/predef/language/objc.h>
|
||||
#include <boost/predef/language/cuda.h>
|
||||
|
||||
#endif
|
||||
|
52
include/boost/predef/language/cuda.h
Normal file
52
include/boost/predef/language/cuda.h
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
Copyright Benjamin Worpitz 2018
|
||||
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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_LANGUAGE_CUDA_H
|
||||
#define BOOST_PREDEF_LANGUAGE_CUDA_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_LANG_CUDA`]
|
||||
|
||||
[@https://en.wikipedia.org/wiki/CUDA CUDA C/C++] language.
|
||||
If available, the version is detected as VV.RR.P.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__CUDACC__`] [__predef_detection__]]
|
||||
[[`__CUDA__`] [__predef_detection__]]
|
||||
|
||||
[[`CUDA_VERSION`] [VV.RR.P]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_LANG_CUDA BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__CUDACC__) || defined(__CUDA__)
|
||||
# undef BOOST_LANG_CUDA
|
||||
# include <cuda.h>
|
||||
# if defined(CUDA_VERSION)
|
||||
# define BOOST_LANG_CUDA BOOST_PREDEF_MAKE_10_VVRRP(CUDA_VERSION)
|
||||
# else
|
||||
# define BOOST_LANG_CUDA BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if BOOST_LANG_CUDA
|
||||
# define BOOST_LANG_CUDA_AVAILABLE
|
||||
#endif
|
||||
|
||||
#define BOOST_LANG_CUDA_NAME "CUDA C/C++"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_CUDA,BOOST_LANG_CUDA_NAME)
|
@ -12,6 +12,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/predef/library/c/_prefix.h>
|
||||
|
||||
#include <boost/predef/library/c/cloudabi.h>
|
||||
#include <boost/predef/library/c/gnu.h>
|
||||
#include <boost/predef/library/c/uc.h>
|
||||
#include <boost/predef/library/c/vms.h>
|
||||
|
53
include/boost/predef/library/c/cloudabi.h
Normal file
53
include/boost/predef/library/c/cloudabi.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2017 James E. King III
|
||||
*
|
||||
* 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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_LIBRARY_C_CLOUDABI_H
|
||||
#define BOOST_PREDEF_LIBRARY_C_CLOUDABI_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
#include <boost/predef/library/c/_prefix.h>
|
||||
|
||||
#if defined(__CloudABI__)
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
/*`
|
||||
[heading `BOOST_LIB_C_CLOUDABI`]
|
||||
|
||||
[@https://github.com/NuxiNL/cloudlibc cloudlibc] - CloudABI's standard C library.
|
||||
Version number available as major, and minor.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__cloudlibc__`] [__predef_detection__]]
|
||||
|
||||
[[`__cloudlibc_major__`, `__cloudlibc_minor__`] [V.R.0]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_LIB_C_CLOUDABI BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__cloudlibc__)
|
||||
# undef BOOST_LIB_C_CLOUDABI
|
||||
# define BOOST_LIB_C_CLOUDABI \
|
||||
BOOST_VERSION_NUMBER(__cloudlibc_major__,__cloudlibc_minor__,0)
|
||||
#endif
|
||||
|
||||
#if BOOST_LIB_C_CLOUDABI
|
||||
# define BOOST_LIB_C_CLOUDABI_AVAILABLE
|
||||
#endif
|
||||
|
||||
#define BOOST_LIB_C_CLOUDABI_NAME "cloudlibc"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_C_CLOUDABI,BOOST_LIB_C_CLOUDABI_NAME)
|
@ -46,10 +46,14 @@ Macros are:
|
||||
#define BOOST_PREDEF_MAKE_0X_VVRRPP(V) BOOST_VERSION_NUMBER((V&0xFF0000)>>16,(V&0xFF00)>>8,(V&0xFF))
|
||||
/*` `BOOST_PREDEF_MAKE_10_VPPP(V)` */
|
||||
#define BOOST_PREDEF_MAKE_10_VPPP(V) BOOST_VERSION_NUMBER(((V)/1000)%10,0,(V)%1000)
|
||||
/*` `BOOST_PREDEF_MAKE_10_VR0(V)` */
|
||||
#define BOOST_PREDEF_MAKE_10_VR0(V) BOOST_VERSION_NUMBER(((V)/100)%10,((V)/10)%10,0)
|
||||
/*` `BOOST_PREDEF_MAKE_10_VRP(V)` */
|
||||
#define BOOST_PREDEF_MAKE_10_VRP(V) BOOST_VERSION_NUMBER(((V)/100)%10,((V)/10)%10,(V)%10)
|
||||
/*` `BOOST_PREDEF_MAKE_10_VRP000(V)` */
|
||||
#define BOOST_PREDEF_MAKE_10_VRP000(V) BOOST_VERSION_NUMBER(((V)/100000)%10,((V)/10000)%10,((V)/1000)%10)
|
||||
/*` `BOOST_PREDEF_MAKE_10_VRPPPP(V)` */
|
||||
#define BOOST_PREDEF_MAKE_10_VRPPPP(V) BOOST_VERSION_NUMBER(((V)/100000)%10,((V)/10000)%10,(V)%10000)
|
||||
/*` `BOOST_PREDEF_MAKE_10_VRPP(V)` */
|
||||
#define BOOST_PREDEF_MAKE_10_VRPP(V) BOOST_VERSION_NUMBER(((V)/1000)%10,((V)/100)%10,(V)%100)
|
||||
/*` `BOOST_PREDEF_MAKE_10_VRR(V)` */
|
||||
@ -62,8 +66,12 @@ Macros are:
|
||||
#define BOOST_PREDEF_MAKE_10_VV00(V) BOOST_VERSION_NUMBER(((V)/100)%100,0,0)
|
||||
/*` `BOOST_PREDEF_MAKE_10_VVRR(V)` */
|
||||
#define BOOST_PREDEF_MAKE_10_VVRR(V) BOOST_VERSION_NUMBER(((V)/100)%100,(V)%100,0)
|
||||
/*` `BOOST_PREDEF_MAKE_10_VVRRP(V)` */
|
||||
#define BOOST_PREDEF_MAKE_10_VVRRP(V) BOOST_VERSION_NUMBER(((V)/1000)%100,((V)/10)%100,(V)%10)
|
||||
/*` `BOOST_PREDEF_MAKE_10_VVRRPP(V)` */
|
||||
#define BOOST_PREDEF_MAKE_10_VVRRPP(V) BOOST_VERSION_NUMBER(((V)/10000)%100,((V)/100)%100,(V)%100)
|
||||
/*` `BOOST_PREDEF_MAKE_10_VVRRPPP(V)` */
|
||||
#define BOOST_PREDEF_MAKE_10_VVRRPPP(V) BOOST_VERSION_NUMBER(((V)/100000)%100,((V)/1000)%100,(V)%1000)
|
||||
/*` `BOOST_PREDEF_MAKE_10_VVRR0PP00(V)` */
|
||||
#define BOOST_PREDEF_MAKE_10_VVRR0PP00(V) BOOST_VERSION_NUMBER(((V)/10000000)%100,((V)/100000)%100,((V)/100)%100)
|
||||
/*` `BOOST_PREDEF_MAKE_10_VVRR0PPPP(V)` */
|
||||
|
@ -13,7 +13,6 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/predef/os/aix.h>
|
||||
#include <boost/predef/os/amigaos.h>
|
||||
#include <boost/predef/os/android.h>
|
||||
#include <boost/predef/os/beos.h>
|
||||
#include <boost/predef/os/bsd.h>
|
||||
#include <boost/predef/os/cygwin.h>
|
||||
@ -30,4 +29,6 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#include <boost/predef/os/vms.h>
|
||||
#include <boost/predef/os/windows.h>
|
||||
|
||||
#include <boost/predef/os/android.h>
|
||||
|
||||
#endif
|
||||
|
@ -5,8 +5,8 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_OS_ADROID_H
|
||||
#define BOOST_PREDEF_OS_ADROID_H
|
||||
#ifndef BOOST_PREDEF_OS_ANDROID_H
|
||||
#define BOOST_PREDEF_OS_ANDROID_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
@ -14,6 +14,9 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
/*`
|
||||
[heading `BOOST_OS_ANDROID`]
|
||||
|
||||
NOTE: `BOOST_OS_ANDROID` is deprecated, and will be removed in a following release.
|
||||
Please use `BOOST_PLAT_ANDROID` instead.
|
||||
|
||||
[@http://en.wikipedia.org/wiki/Android_%28operating_system%29 Android] operating system.
|
||||
|
||||
[table
|
||||
|
@ -89,7 +89,7 @@ of BSD. If the above variants is detected the corresponding macro is also set.]
|
||||
|
||||
#define BOOST_OS_BSD_NAME "BSD"
|
||||
|
||||
#else
|
||||
#endif
|
||||
|
||||
#include <boost/predef/os/bsd/bsdi.h>
|
||||
#include <boost/predef/os/bsd/dragonfly.h>
|
||||
@ -97,7 +97,5 @@ of BSD. If the above variants is detected the corresponding macro is also set.]
|
||||
#include <boost/predef/os/bsd/open.h>
|
||||
#include <boost/predef/os/bsd/net.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD,BOOST_OS_BSD_NAME)
|
||||
|
@ -34,13 +34,20 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
# define BOOST_OS_BSD_AVAILABLE
|
||||
# endif
|
||||
# undef BOOST_OS_BSD_FREE
|
||||
# include <sys/param.h>
|
||||
# if defined(__FreeBSD_version)
|
||||
# if __FreeBSD_version < 500000
|
||||
# if __FreeBSD_version == 491000
|
||||
# define BOOST_OS_BSD_FREE \
|
||||
BOOST_PREDEF_MAKE_10_VRP000(__FreeBSD_version)
|
||||
BOOST_VERSION_NUMBER(4, 10, 0)
|
||||
# elif __FreeBSD_version == 492000
|
||||
# define BOOST_OS_BSD_FREE \
|
||||
BOOST_VERSION_NUMBER(4, 11, 0)
|
||||
# elif __FreeBSD_version < 500000
|
||||
# define BOOST_OS_BSD_FREE \
|
||||
BOOST_PREDEF_MAKE_10_VRPPPP(__FreeBSD_version)
|
||||
# else
|
||||
# define BOOST_OS_BSD_FREE \
|
||||
BOOST_PREDEF_MAKE_10_VRR000(__FreeBSD_version)
|
||||
BOOST_PREDEF_MAKE_10_VVRRPPP(__FreeBSD_version)
|
||||
# endif
|
||||
# else
|
||||
# define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_AVAILABLE
|
||||
|
@ -76,7 +76,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
# include <boost/predef/detail/os_detected.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_OS_BSD_NET_NAME "DragonFly BSD"
|
||||
#define BOOST_OS_BSD_NET_NAME "NetBSD"
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -50,6 +50,26 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
[[`OpenBSD4_7`] [4.7.0]]
|
||||
[[`OpenBSD4_8`] [4.8.0]]
|
||||
[[`OpenBSD4_9`] [4.9.0]]
|
||||
[[`OpenBSD5_0`] [5.0.0]]
|
||||
[[`OpenBSD5_1`] [5.1.0]]
|
||||
[[`OpenBSD5_2`] [5.2.0]]
|
||||
[[`OpenBSD5_3`] [5.3.0]]
|
||||
[[`OpenBSD5_4`] [5.4.0]]
|
||||
[[`OpenBSD5_5`] [5.5.0]]
|
||||
[[`OpenBSD5_6`] [5.6.0]]
|
||||
[[`OpenBSD5_7`] [5.7.0]]
|
||||
[[`OpenBSD5_8`] [5.8.0]]
|
||||
[[`OpenBSD5_9`] [5.9.0]]
|
||||
[[`OpenBSD6_0`] [6.0.0]]
|
||||
[[`OpenBSD6_1`] [6.1.0]]
|
||||
[[`OpenBSD6_2`] [6.2.0]]
|
||||
[[`OpenBSD6_3`] [6.3.0]]
|
||||
[[`OpenBSD6_4`] [6.4.0]]
|
||||
[[`OpenBSD6_5`] [6.5.0]]
|
||||
[[`OpenBSD6_6`] [6.6.0]]
|
||||
[[`OpenBSD6_7`] [6.7.0]]
|
||||
[[`OpenBSD6_8`] [6.8.0]]
|
||||
[[`OpenBSD6_9`] [6.9.0]]
|
||||
]
|
||||
*/
|
||||
|
||||
@ -153,6 +173,66 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_9)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,9,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD5_0)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(5,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD5_1)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(5,1,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD5_2)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(5,2,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD5_3)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(5,3,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD5_4)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(5,4,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD5_5)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(5,5,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD5_6)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(5,6,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD5_7)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(5,7,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD5_8)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(5,8,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD5_9)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(5,9,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD6_0)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(6,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD6_1)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(6,1,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD6_2)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(6,2,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD6_3)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(6,3,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD6_4)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(6,4,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD6_5)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(6,5,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD6_6)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(6,6,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD6_7)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(6,7,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD6_8)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(6,8,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD6_9)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(6,9,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD_OPEN)
|
||||
# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
|
@ -20,6 +20,8 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__CYGWIN__`] [__predef_detection__]]
|
||||
|
||||
[[`CYGWIN_VERSION_API_MAJOR`, `CYGWIN_VERSION_API_MINOR`] [V.R.0]]
|
||||
]
|
||||
*/
|
||||
|
||||
@ -28,8 +30,11 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
|
||||
defined(__CYGWIN__) \
|
||||
)
|
||||
# include <cygwin/version.h>
|
||||
# undef BOOST_OS_CYGWIN
|
||||
# define BOOST_OS_CYGWIN BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# define BOOST_OS_CYGWIN \
|
||||
BOOST_VERSION_NUMBER(CYGWIN_VERSION_API_MAJOR,\
|
||||
CYGWIN_VERSION_API_MINOR, 0)
|
||||
#endif
|
||||
|
||||
#if BOOST_OS_CYGWIN
|
||||
|
@ -21,13 +21,16 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
[[`linux`] [__predef_detection__]]
|
||||
[[`__linux`] [__predef_detection__]]
|
||||
[[`__linux__`] [__predef_detection__]]
|
||||
[[`__gnu_linux__`] [__predef_detection__]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_OS_LINUX BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
|
||||
defined(linux) || defined(__linux) \
|
||||
defined(linux) || defined(__linux) || \
|
||||
defined(__linux__) || defined(__gnu_linux__) \
|
||||
)
|
||||
# undef BOOST_OS_LINUX
|
||||
# define BOOST_OS_LINUX BOOST_VERSION_NUMBER_AVAILABLE
|
||||
|
@ -127,7 +127,8 @@ information and acquired knowledge:
|
||||
defined(__AARCH64EL__) || \
|
||||
defined(_MIPSEL) || \
|
||||
defined(__MIPSEL) || \
|
||||
defined(__MIPSEL__)
|
||||
defined(__MIPSEL__) || \
|
||||
defined(__riscv)
|
||||
# undef BOOST_ENDIAN_LITTLE_BYTE
|
||||
# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
@ -148,8 +149,7 @@ information and acquired knowledge:
|
||||
# undef BOOST_ENDIAN_BIG_BYTE
|
||||
# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
# if BOOST_ARCH_AMD64 || \
|
||||
BOOST_ARCH_IA64 || \
|
||||
# if BOOST_ARCH_IA64 || \
|
||||
BOOST_ARCH_X86 || \
|
||||
BOOST_ARCH_BLACKFIN
|
||||
# undef BOOST_ENDIAN_LITTLE_BYTE
|
||||
|
87
include/boost/predef/other/workaround.h
Normal file
87
include/boost/predef/other/workaround.h
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2017
|
||||
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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_WORKAROUND_H
|
||||
#define BOOST_PREDEF_WORKAROUND_H
|
||||
|
||||
/*`
|
||||
[heading `BOOST_PREDEF_WORKAROUND`]
|
||||
|
||||
``
|
||||
BOOST_PREDEF_WORKAROUND(symbol,comp,major,minor,patch)
|
||||
``
|
||||
|
||||
Usage:
|
||||
|
||||
``
|
||||
#if BOOST_PREDEF_WORKAROUND(BOOST_COMP_CLANG,<,3,0,0)
|
||||
// Workaround for old clang compilers..
|
||||
#endif
|
||||
``
|
||||
|
||||
Defines a comparison against two version numbers that depends on the definion
|
||||
of `BOOST_STRICT_CONFIG`. When `BOOST_STRICT_CONFIG` is defined this will expand
|
||||
to a value convertible to `false`. Which has the effect of disabling all code
|
||||
conditionally guarded by `BOOST_PREDEF_WORKAROUND`. When `BOOST_STRICT_CONFIG`
|
||||
is undefine this expand to test the given `symbol` version value with the
|
||||
`comp` comparison against `BOOST_VERSION_NUMBER(major,minor,patch)`.
|
||||
*/
|
||||
#ifdef BOOST_STRICT_CONFIG
|
||||
# define BOOST_PREDEF_WORKAROUND(symbol, comp, major, minor, patch) (0)
|
||||
#else
|
||||
# include <boost/predef/version_number.h>
|
||||
# define BOOST_PREDEF_WORKAROUND(symbol, comp, major, minor, patch) \
|
||||
( (symbol) != (0) ) && \
|
||||
( (symbol) comp (BOOST_VERSION_NUMBER( (major) , (minor) , (patch) )) )
|
||||
#endif
|
||||
|
||||
/*`
|
||||
[heading `BOOST_PREDEF_TESTED_AT`]
|
||||
|
||||
``
|
||||
BOOST_PREDEF_TESTED_AT(symbol,major,minor,patch)
|
||||
``
|
||||
|
||||
Usage:
|
||||
|
||||
``
|
||||
#if BOOST_PREDEF_TESTED_AT(BOOST_COMP_CLANG,3,5,0)
|
||||
// Needed for clang, and last checked for 3.5.0.
|
||||
#endif
|
||||
``
|
||||
|
||||
Defines a comparison against two version numbers that depends on the definion
|
||||
of `BOOST_STRICT_CONFIG` and `BOOST_DETECT_OUTDATED_WORKAROUNDS`.
|
||||
When `BOOST_STRICT_CONFIG` is defined this will expand to a value convertible
|
||||
to `false`. Which has the effect of disabling all code
|
||||
conditionally guarded by `BOOST_PREDEF_TESTED_AT`. When `BOOST_STRICT_CONFIG`
|
||||
is undefined this expand to either:
|
||||
|
||||
* A value convertible to `true` when `BOOST_DETECT_OUTDATED_WORKAROUNDS` is not
|
||||
defined.
|
||||
* A value convertible `true` when the expansion of
|
||||
`BOOST_PREDEF_WORKAROUND(symbol, <=, major, minor, patch)` is `true` and
|
||||
`BOOST_DETECT_OUTDATED_WORKAROUNDS` is defined.
|
||||
* A compile error when the expansion of
|
||||
`BOOST_PREDEF_WORKAROUND(symbol, >, major, minor, patch)` is true and
|
||||
`BOOST_DETECT_OUTDATED_WORKAROUNDS` is defined.
|
||||
*/
|
||||
#ifdef BOOST_STRICT_CONFIG
|
||||
# define BOOST_PREDEF_TESTED_AT(symbol, major, minor, patch) (0)
|
||||
#else
|
||||
# ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS
|
||||
# define BOOST_PREDEF_TESTED_AT(symbol, major, minor, patch) ( \
|
||||
BOOST_PREDEF_WORKAROUND(symbol, <=, major, minor, patch) \
|
||||
? 1 \
|
||||
: (1%0) )
|
||||
# else
|
||||
# define BOOST_PREDEF_TESTED_AT(symbol, major, minor, patch) \
|
||||
( (symbol) >= BOOST_VERSION_NUMBER_AVAILABLE )
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
@ -11,11 +11,19 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#define BOOST_PREDEF_PLATFORM_H
|
||||
#endif
|
||||
|
||||
#include <boost/predef/platform/android.h>
|
||||
#include <boost/predef/platform/cloudabi.h>
|
||||
#include <boost/predef/platform/mingw.h>
|
||||
#include <boost/predef/platform/mingw32.h>
|
||||
#include <boost/predef/platform/mingw64.h>
|
||||
#include <boost/predef/platform/windows_uwp.h>
|
||||
#include <boost/predef/platform/windows_desktop.h>
|
||||
#include <boost/predef/platform/windows_store.h>
|
||||
#include <boost/predef/platform/windows_phone.h>
|
||||
#include <boost/predef/platform/windows_runtime.h>
|
||||
#include <boost/predef/platform/windows_server.h>
|
||||
#include <boost/predef/platform/windows_store.h>
|
||||
#include <boost/predef/platform/windows_system.h>
|
||||
#include <boost/predef/platform/windows_runtime.h> // deprecated
|
||||
#include <boost/predef/platform/ios.h>
|
||||
/*#include <boost/predef/platform/.h>*/
|
||||
|
||||
#endif
|
||||
|
43
include/boost/predef/platform/android.h
Normal file
43
include/boost/predef/platform/android.h
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2015-2019
|
||||
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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_PLAT_ANDROID_H
|
||||
#define BOOST_PREDEF_PLAT_ANDROID_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_PLAT_ANDROID`]
|
||||
|
||||
[@http://en.wikipedia.org/wiki/Android_%28operating_system%29 Android] platform.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__ANDROID__`] [__predef_detection__]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_PLAT_ANDROID BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
# undef BOOST_PLAT_ANDROID
|
||||
# define BOOST_PLAT_ANDROID BOOST_VERSION_NUMBER_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if BOOST_PLAT_ANDROID
|
||||
# define BOOST_PLAT_ANDROID_AVAILABLE
|
||||
# include <boost/predef/detail/platform_detected.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_PLAT_ANDROID_NAME "Android"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_ANDROID,BOOST_PLAT_ANDROID_NAME)
|
43
include/boost/predef/platform/cloudabi.h
Normal file
43
include/boost/predef/platform/cloudabi.h
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
Copyright 2017 James E. King, III
|
||||
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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_PLAT_CLOUDABI_H
|
||||
#define BOOST_PREDEF_PLAT_CLOUDABI_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_PLAT_CLOUDABI`]
|
||||
|
||||
[@https://github.com/NuxiNL/cloudabi CloudABI] platform.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__CloudABI__`] [__predef_detection__]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_PLAT_CLOUDABI BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__CloudABI__)
|
||||
# undef BOOST_PLAT_CLOUDABI
|
||||
# define BOOST_PLAT_CLOUDABI BOOST_VERSION_NUMBER_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if BOOST_PLAT_CLOUDABI
|
||||
# define BOOST_PLAT_CLOUDABI_AVAILABLE
|
||||
# include <boost/predef/detail/platform_detected.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_PLAT_CLOUDABI_NAME "CloudABI"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_CLOUDABI,BOOST_PLAT_CLOUDABI_NAME)
|
62
include/boost/predef/platform/ios.h
Normal file
62
include/boost/predef/platform/ios.h
Normal file
@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright Ruslan Baratov 2017
|
||||
Copyright Rene Rivera 2017
|
||||
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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_PLAT_IOS_H
|
||||
#define BOOST_PREDEF_PLAT_IOS_H
|
||||
|
||||
#include <boost/predef/os/ios.h> // BOOST_OS_IOS
|
||||
#include <boost/predef/version_number.h> // BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
/*`
|
||||
[heading `BOOST_PLAT_IOS_DEVICE`]
|
||||
[heading `BOOST_PLAT_IOS_SIMULATOR`]
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`TARGET_IPHONE_SIMULATOR`] [__predef_detection__]]
|
||||
[[`TARGET_OS_SIMULATOR`] [__predef_detection__]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_PLAT_IOS_DEVICE BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
#define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h
|
||||
#if BOOST_OS_IOS
|
||||
# include <TargetConditionals.h>
|
||||
# if defined(TARGET_OS_SIMULATOR) && (TARGET_OS_SIMULATOR == 1)
|
||||
# undef BOOST_PLAT_IOS_SIMULATOR
|
||||
# define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# elif defined(TARGET_IPHONE_SIMULATOR) && (TARGET_IPHONE_SIMULATOR == 1)
|
||||
# undef BOOST_PLAT_IOS_SIMULATOR
|
||||
# define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# else
|
||||
# undef BOOST_PLAT_IOS_DEVICE
|
||||
# define BOOST_PLAT_IOS_DEVICE BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if BOOST_PLAT_IOS_SIMULATOR
|
||||
# define BOOST_PLAT_IOS_SIMULATOR_AVAILABLE
|
||||
# include <boost/predef/detail/platform_detected.h>
|
||||
#endif
|
||||
|
||||
#if BOOST_PLAT_IOS_DEVICE
|
||||
# define BOOST_PLAT_IOS_DEVICE_AVAILABLE
|
||||
# include <boost/predef/detail/platform_detected.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_PLAT_IOS_SIMULATOR_NAME "iOS Simulator"
|
||||
#define BOOST_PLAT_IOS_DEVICE_NAME "iOS Device"
|
||||
|
||||
#endif // BOOST_PREDEF_PLAT_IOS_H
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_IOS_SIMULATOR,BOOST_PLAT_IOS_SIMULATOR_NAME)
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_IOS_DEVICE,BOOST_PLAT_IOS_DEVICE_NAME)
|
@ -5,8 +5,8 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_COMPILER_MINGW_H
|
||||
#define BOOST_PREDEF_COMPILER_MINGW_H
|
||||
#ifndef BOOST_PREDEF_PLAT_MINGW_H
|
||||
#define BOOST_PREDEF_PLAT_MINGW_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
@ -14,7 +14,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
/*`
|
||||
[heading `BOOST_PLAT_MINGW`]
|
||||
|
||||
[@http://en.wikipedia.org/wiki/MinGW MinGW] platform.
|
||||
[@http://en.wikipedia.org/wiki/MinGW MinGW] platform, either variety.
|
||||
Version number available as major, minor, and patch.
|
||||
|
||||
[table
|
||||
@ -56,7 +56,7 @@ Version number available as major, minor, and patch.
|
||||
# include <boost/predef/detail/platform_detected.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_PLAT_MINGW_NAME "MinGW"
|
||||
#define BOOST_PLAT_MINGW_NAME "MinGW (any variety)"
|
||||
|
||||
#endif
|
||||
|
||||
|
63
include/boost/predef/platform/mingw32.h
Normal file
63
include/boost/predef/platform/mingw32.h
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2008-2015
|
||||
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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_PLAT_MINGW32_H
|
||||
#define BOOST_PREDEF_PLAT_MINGW32_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_PLAT_MINGW32`]
|
||||
|
||||
[@http://www.mingw.org/ MinGW] platform.
|
||||
Version number available as major, minor, and patch.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__MINGW32__`] [__predef_detection__]]
|
||||
|
||||
[[`__MINGW32_VERSION_MAJOR`, `__MINGW32_VERSION_MINOR`] [V.R.0]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_PLAT_MINGW32 BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
# include <_mingw.h>
|
||||
# if !defined(BOOST_PLAT_MINGW32_DETECTION) && (defined(__MINGW32_VERSION_MAJOR) && defined(__MINGW32_VERSION_MINOR))
|
||||
# define BOOST_PLAT_MINGW32_DETECTION \
|
||||
BOOST_VERSION_NUMBER(__MINGW32_VERSION_MAJOR,__MINGW32_VERSION_MINOR,0)
|
||||
# endif
|
||||
# if !defined(BOOST_PLAT_MINGW32_DETECTION)
|
||||
# define BOOST_PLAT_MINGW32_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_PLAT_MINGW32_DETECTION
|
||||
# define BOOST_PLAT_MINGW32_AVAILABLE
|
||||
# if defined(BOOST_PREDEF_DETAIL_PLAT_DETECTED)
|
||||
# define BOOST_PLAT_MINGW32_EMULATED BOOST_PLAT_MINGW32_DETECTION
|
||||
# else
|
||||
# undef BOOST_PLAT_MINGW32
|
||||
# define BOOST_PLAT_MINGW32 BOOST_PLAT_MINGW32_DETECTION
|
||||
# endif
|
||||
# include <boost/predef/detail/platform_detected.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_PLAT_MINGW32_NAME "MinGW"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_MINGW32,BOOST_PLAT_MINGW32_NAME)
|
||||
|
||||
#ifdef BOOST_PLAT_MINGW32_EMULATED
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_MINGW32_EMULATED,BOOST_PLAT_MINGW32_NAME)
|
||||
#endif
|
63
include/boost/predef/platform/mingw64.h
Normal file
63
include/boost/predef/platform/mingw64.h
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2008-2015
|
||||
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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_PLAT_MINGW64_H
|
||||
#define BOOST_PREDEF_PLAT_MINGW64_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_PLAT_MINGW64`]
|
||||
|
||||
[@https://mingw-w64.org/ MinGW-w64] platform.
|
||||
Version number available as major, minor, and patch.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__MINGW64__`] [__predef_detection__]]
|
||||
|
||||
[[`__MINGW64_VERSION_MAJOR`, `__MINGW64_VERSION_MINOR`] [V.R.0]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_PLAT_MINGW64 BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__MINGW64__)
|
||||
# include <_mingw.h>
|
||||
# if !defined(BOOST_PLAT_MINGW64_DETECTION) && (defined(__MINGW64_VERSION_MAJOR) && defined(__MINGW64_VERSION_MINOR))
|
||||
# define BOOST_PLAT_MINGW64_DETECTION \
|
||||
BOOST_VERSION_NUMBER(__MINGW64_VERSION_MAJOR,__MINGW64_VERSION_MINOR,0)
|
||||
# endif
|
||||
# if !defined(BOOST_PLAT_MINGW64_DETECTION)
|
||||
# define BOOST_PLAT_MINGW64_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_PLAT_MINGW64_DETECTION
|
||||
# define BOOST_PLAT_MINGW64_AVAILABLE
|
||||
# if defined(BOOST_PREDEF_DETAIL_PLAT_DETECTED)
|
||||
# define BOOST_PLAT_MINGW64_EMULATED BOOST_PLAT_MINGW64_DETECTION
|
||||
# else
|
||||
# undef BOOST_PLAT_MINGW64
|
||||
# define BOOST_PLAT_MINGW64 BOOST_PLAT_MINGW64_DETECTION
|
||||
# endif
|
||||
# include <boost/predef/detail/platform_detected.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_PLAT_MINGW64_NAME "MinGW-w64"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_MINGW64,BOOST_PLAT_MINGW64_NAME)
|
||||
|
||||
#ifdef BOOST_PLAT_MINGW64_EMULATED
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_MINGW64_EMULATED,BOOST_PLAT_MINGW64_NAME)
|
||||
#endif
|
@ -9,25 +9,31 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_PREDEF_PLAT_WINDOWS_DESKTOP_H
|
||||
#define BOOST_PREDEF_PLAT_WINDOWS_DESKTOP_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
#include <boost/predef/os/windows.h>
|
||||
#include <boost/predef/platform/windows_uwp.h>
|
||||
#include <boost/predef/version_number.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_PLAT_WINDOWS_DESKTOP`]
|
||||
|
||||
[@https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide UWP]
|
||||
for Windows Desktop development. Also available if the Platform SDK is too
|
||||
old to support UWP.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`!WINAPI_FAMILY`] [__predef_detection__]]
|
||||
[[`WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP`] [__predef_detection__]]
|
||||
[[`!BOOST_PLAT_WINDOWS_UWP`] [__predef_detection__]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_PLAT_WINDOWS_DESKTOP BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if BOOST_OS_WINDOWS && \
|
||||
( !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) )
|
||||
((defined(WINAPI_FAMILY_DESKTOP_APP) && WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) || \
|
||||
!BOOST_PLAT_WINDOWS_UWP)
|
||||
# undef BOOST_PLAT_WINDOWS_DESKTOP
|
||||
# define BOOST_PLAT_WINDOWS_DESKTOP BOOST_VERSION_NUMBER_AVAILABLE
|
||||
#endif
|
||||
|
@ -9,13 +9,17 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_PREDEF_PLAT_WINDOWS_PHONE_H
|
||||
#define BOOST_PREDEF_PLAT_WINDOWS_PHONE_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
#include <boost/predef/os/windows.h>
|
||||
#include <boost/predef/platform/windows_uwp.h>
|
||||
#include <boost/predef/version_number.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_PLAT_WINDOWS_PHONE`]
|
||||
|
||||
[@https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide UWP]
|
||||
for Windows Phone development.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
@ -25,7 +29,8 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_PLAT_WINDOWS_PHONE BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if BOOST_OS_WINDOWS && defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#if BOOST_OS_WINDOWS && \
|
||||
defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
# undef BOOST_PLAT_WINDOWS_PHONE
|
||||
# define BOOST_PLAT_WINDOWS_PHONE BOOST_VERSION_NUMBER_AVAILABLE
|
||||
#endif
|
||||
|
@ -9,25 +9,33 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_PREDEF_PLAT_WINDOWS_RUNTIME_H
|
||||
#define BOOST_PREDEF_PLAT_WINDOWS_RUNTIME_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
#include <boost/predef/os/windows.h>
|
||||
#include <boost/predef/platform/windows_phone.h>
|
||||
#include <boost/predef/platform/windows_store.h>
|
||||
#include <boost/predef/version_number.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_PLAT_WINDOWS_RUNTIME`]
|
||||
|
||||
Deprecated.
|
||||
|
||||
[@https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide UWP]
|
||||
for Windows Phone or Store development. This does not align to the existing development model for
|
||||
UWP and is deprecated. Use one of the other `BOOST_PLAT_WINDOWS_*`definitions instead.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`WINAPI_FAMILY == WINAPI_FAMILY_APP`] [__predef_detection__]]
|
||||
[[`WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP`] [__predef_detection__]]
|
||||
[[`BOOST_PLAT_WINDOWS_PHONE`] [__predef_detection__]]
|
||||
[[`BOOST_PLAT_WINDOWS_STORE`] [__predef_detection__]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_PLAT_WINDOWS_RUNTIME BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if BOOST_OS_WINDOWS && defined(WINAPI_FAMILY) && \
|
||||
( WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP )
|
||||
#if BOOST_OS_WINDOWS && \
|
||||
(BOOST_PLAT_WINDOWS_STORE || BOOST_PLAT_WINDOWS_PHONE)
|
||||
# undef BOOST_PLAT_WINDOWS_RUNTIME
|
||||
# define BOOST_PLAT_WINDOWS_RUNTIME BOOST_VERSION_NUMBER_AVAILABLE
|
||||
#endif
|
||||
|
47
include/boost/predef/platform/windows_server.h
Normal file
47
include/boost/predef/platform/windows_server.h
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
Copyright James E. King III, 2017
|
||||
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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_PLAT_WINDOWS_SERVER_H
|
||||
#define BOOST_PREDEF_PLAT_WINDOWS_SERVER_H
|
||||
|
||||
#include <boost/predef/make.h>
|
||||
#include <boost/predef/os/windows.h>
|
||||
#include <boost/predef/platform/windows_uwp.h>
|
||||
#include <boost/predef/version_number.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_PLAT_WINDOWS_SERVER`]
|
||||
|
||||
[@https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide UWP]
|
||||
for Windows Server development.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`WINAPI_FAMILY == WINAPI_FAMILY_SERVER`] [__predef_detection__]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_PLAT_WINDOWS_SERVER BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if BOOST_OS_WINDOWS && \
|
||||
defined(WINAPI_FAMILY_SERVER) && WINAPI_FAMILY == WINAPI_FAMILY_SERVER
|
||||
# undef BOOST_PLAT_WINDOWS_SERVER
|
||||
# define BOOST_PLAT_WINDOWS_SERVER BOOST_VERSION_NUMBER_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if BOOST_PLAT_WINDOWS_SERVER
|
||||
# define BOOST_PLAT_WINDOWS_SERVER_AVAILABLE
|
||||
# include <boost/predef/detail/platform_detected.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_PLAT_WINDOWS_SERVER_NAME "Windows Server"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_SERVER,BOOST_PLAT_WINDOWS_SERVER_NAME)
|
@ -9,23 +9,30 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_PREDEF_PLAT_WINDOWS_STORE_H
|
||||
#define BOOST_PREDEF_PLAT_WINDOWS_STORE_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
#include <boost/predef/os/windows.h>
|
||||
#include <boost/predef/platform/windows_uwp.h>
|
||||
#include <boost/predef/version_number.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_PLAT_WINDOWS_STORE`]
|
||||
|
||||
[@https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide UWP]
|
||||
for Windows Store development.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`WINAPI_FAMILY == WINAPI_FAMILY_APP`] [__predef_detection__]]
|
||||
]
|
||||
[[`WINAPI_FAMILY == WINAPI_FAMILY_PC_APP`] [__predef_detection__]]
|
||||
[[`WINAPI_FAMILY == WINAPI_FAMILY_APP` (deprecated)] [__predef_detection__]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_PLAT_WINDOWS_STORE BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if BOOST_OS_WINDOWS && defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP
|
||||
#if BOOST_OS_WINDOWS && \
|
||||
((defined(WINAPI_FAMILY_PC_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) || \
|
||||
(defined(WINAPI_FAMILY_APP) && WINAPI_FAMILY == WINAPI_FAMILY_APP))
|
||||
# undef BOOST_PLAT_WINDOWS_STORE
|
||||
# define BOOST_PLAT_WINDOWS_STORE BOOST_VERSION_NUMBER_AVAILABLE
|
||||
#endif
|
||||
|
47
include/boost/predef/platform/windows_system.h
Normal file
47
include/boost/predef/platform/windows_system.h
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
Copyright James E. King III, 2017
|
||||
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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_PLAT_WINDOWS_SYSTEM_H
|
||||
#define BOOST_PREDEF_PLAT_WINDOWS_SYSTEM_H
|
||||
|
||||
#include <boost/predef/make.h>
|
||||
#include <boost/predef/os/windows.h>
|
||||
#include <boost/predef/platform/windows_uwp.h>
|
||||
#include <boost/predef/version_number.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_PLAT_WINDOWS_SYSTEM`]
|
||||
|
||||
[@https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide UWP]
|
||||
for Windows System development.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`WINAPI_FAMILY == WINAPI_FAMILY_SYSTEM`] [__predef_detection__]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_PLAT_WINDOWS_SYSTEM BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if BOOST_OS_WINDOWS && \
|
||||
defined(WINAPI_FAMILY_SYSTEM) && WINAPI_FAMILY == WINAPI_FAMILY_SYSTEM
|
||||
# undef BOOST_PLAT_WINDOWS_SYSTEM
|
||||
# define BOOST_PLAT_WINDOWS_SYSTEM BOOST_VERSION_NUMBER_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if BOOST_PLAT_WINDOWS_SYSTEM
|
||||
# define BOOST_PLAT_WINDOWS_SYSTEM_AVAILABLE
|
||||
# include <boost/predef/detail/platform_detected.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_PLAT_WINDOWS_SYSTEM_NAME "Windows Drivers and Tools"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_SYSTEM,BOOST_PLAT_WINDOWS_SYSTEM_NAME)
|
60
include/boost/predef/platform/windows_uwp.h
Normal file
60
include/boost/predef/platform/windows_uwp.h
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
Copyright James E. King III, 2017
|
||||
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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_PLAT_WINDOWS_UWP_H
|
||||
#define BOOST_PREDEF_PLAT_WINDOWS_UWP_H
|
||||
|
||||
#include <boost/predef/make.h>
|
||||
#include <boost/predef/os/windows.h>
|
||||
#include <boost/predef/version_number.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_PLAT_WINDOWS_UWP`]
|
||||
|
||||
[@http://docs.microsoft.com/windows/uwp/ Universal Windows Platform]
|
||||
is available if the current development environment is capable of targeting
|
||||
UWP development.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__MINGW64_VERSION_MAJOR` from `_mingw.h`] [`>= 3`]]
|
||||
[[`VER_PRODUCTBUILD` from `ntverp.h`] [`>= 9200`]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_PLAT_WINDOWS_UWP BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
#define BOOST_PLAT_WINDOWS_SDK_VERSION BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if BOOST_OS_WINDOWS
|
||||
// MinGW (32-bit) has no ntverp.h header
|
||||
#if !defined(__MINGW32__)
|
||||
# include <ntverp.h>
|
||||
# undef BOOST_PLAT_WINDOWS_SDK_VERSION
|
||||
# define BOOST_PLAT_WINDOWS_SDK_VERSION BOOST_VERSION_NUMBER(0, 0, VER_PRODUCTBUILD)
|
||||
#endif
|
||||
|
||||
// 9200 is Windows SDK 8.0 from ntverp.h which introduced family support
|
||||
#if ((BOOST_PLAT_WINDOWS_SDK_VERSION >= BOOST_VERSION_NUMBER(0, 0, 9200)) || \
|
||||
(defined(__MINGW64__) && __MINGW64_VERSION_MAJOR >= 3))
|
||||
# undef BOOST_PLAT_WINDOWS_UWP
|
||||
# define BOOST_PLAT_WINDOWS_UWP BOOST_VERSION_NUMBER_AVAILABLE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if BOOST_PLAT_WINDOWS_UWP
|
||||
# define BOOST_PLAT_WINDOWS_UWP_AVAILABLE
|
||||
# include <boost/predef/detail/platform_detected.h>
|
||||
# include <winapifamily.h> // Windows SDK
|
||||
#endif
|
||||
|
||||
#define BOOST_PLAT_WINDOWS_UWP_NAME "Universal Windows Platform"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_UWP, BOOST_PLAT_WINDOWS_UWP_NAME)
|
@ -10,6 +10,6 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
|
||||
#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,5,0)
|
||||
#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,11,0)
|
||||
|
||||
#endif
|
||||
|
52
test/build.jam
Executable file → Normal file
52
test/build.jam
Executable file → Normal file
@ -1,49 +1,26 @@
|
||||
#!/usr/bin/env b2 -a --verbose-test
|
||||
# Copyright Rene Rivera 2011-2016
|
||||
# Copyright Rene Rivera 2011-2019
|
||||
# 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 ../check/predef : require check : predef-require predef-check ;
|
||||
import ../tools/check/predef : require check : predef-require predef-check ;
|
||||
import path ;
|
||||
|
||||
local predef-include-root ;
|
||||
local predef-dependency ;
|
||||
|
||||
local modular-predef-h = [ glob $(BOOST_PREDEF_ROOT)/include/boost/predef.h ] ;
|
||||
local BOOST_RELEASE_LAYOUT ;
|
||||
if ! $(modular-predef-h)
|
||||
# This deals with the unfortunate aspect of a Boost monolithic release
|
||||
# not having the modular include dirs. This is a kludge that just removes
|
||||
# the direct depdndency to the header if it can't find it.
|
||||
local PREDEF_H = $(BOOST_PREDEF_INCLUDE)/boost/predef.h ;
|
||||
if ! [ path.exists $(PREDEF_H) ]
|
||||
{
|
||||
BOOST_RELEASE_LAYOUT = yes ;
|
||||
PREDEF_H = ;
|
||||
}
|
||||
|
||||
# When using modular layout, header files are not present in $root/boost
|
||||
# unlink links are created, therefore instead of direct dependency on
|
||||
# a header, we need to use dependency on metatarget.
|
||||
if $(BOOST_RELEASE_LAYOUT)
|
||||
{
|
||||
predef-dependency = $(predef-include-root)/boost/predef.h ;
|
||||
}
|
||||
else if $(BOOST_PREDEF_ROOT)
|
||||
{
|
||||
predef-include-root = $(BOOST_PREDEF_ROOT)/include ;
|
||||
predef-dependency = $(predef-include-root)/boost/predef.h ;
|
||||
}
|
||||
else if $(BOOST_MODULARLAYOUT)
|
||||
{
|
||||
predef-include-root = $(BOOST_ROOT) ;
|
||||
predef-dependency = /boost//predef-headers ;
|
||||
}
|
||||
else
|
||||
{
|
||||
predef-dependency = $(predef-include-root)/boost/predef.h ;
|
||||
}
|
||||
|
||||
project test
|
||||
project
|
||||
: requirements
|
||||
<include>$(predef-include-root)
|
||||
<include>$(BOOST_PREDEF_INCLUDE)
|
||||
# Add explicit dependency since we don't have header scanner for
|
||||
# .m and .mm files.
|
||||
<dependency>$(predef-dependency)
|
||||
<dependency>$(PREDEF_H)
|
||||
;
|
||||
|
||||
using testing ;
|
||||
@ -59,6 +36,11 @@ test-suite predef :
|
||||
[ compile macos_vs_bsd.c : [ predef-require "BOOST_OS_MACOS" : cpp ] ]
|
||||
[ run check_value.cpp : : : <test-info>always_show_run_output
|
||||
[ predef-check "BOOST_COMP_CLANG > 0.0.0" "BOOST_OS_LINUX == 0" : : <cxxflags>-DCHECK_VALUE=true ] ]
|
||||
[ run workaround.cpp ]
|
||||
[ compile workaround_strict_config.cpp ]
|
||||
[ run tested_at.cpp ]
|
||||
[ compile-fail tested_at_outdated.cpp : <test-info>always_show_run_output ]
|
||||
[ compile platform_windows.cpp ]
|
||||
;
|
||||
|
||||
# Minimal testing done for predef for CI. Since
|
||||
|
@ -38,12 +38,16 @@ void test_BOOST_VERSION_NUMBER()
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VRRPP000(0xFFFFF000) == BOOST_VERSION_NUMBER(0xF,0xFF,0xFF));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VVRRPP(0xFFFFFF) == BOOST_VERSION_NUMBER(0xFF,0xFF,0xFF));
|
||||
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VR0(980) == BOOST_VERSION_NUMBER(9,8,0));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRP(999) == BOOST_VERSION_NUMBER(9,9,9));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VPPP(9999) == BOOST_VERSION_NUMBER(9,0,999));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRRPP(999999) == BOOST_VERSION_NUMBER(99,99,99));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRR(9999) == BOOST_VERSION_NUMBER(99,99,0));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRRP(98765) == BOOST_VERSION_NUMBER(98,76,5));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRPP(9999) == BOOST_VERSION_NUMBER(9,9,99));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRRPP(99999) == BOOST_VERSION_NUMBER(9,99,99));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRPPPP(460002) == BOOST_VERSION_NUMBER(4,6,2));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRPPPP(491000) == BOOST_VERSION_NUMBER(4,9,1000));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRP000(999000) == BOOST_VERSION_NUMBER(9,9,9));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRR000(999000) == BOOST_VERSION_NUMBER(9,99,0));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRR00PP00(2199009900u) == BOOST_VERSION_NUMBER(21,99,99));
|
||||
@ -52,6 +56,8 @@ void test_BOOST_VERSION_NUMBER()
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VV00(9900) == BOOST_VERSION_NUMBER(99,00,00));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRR0PPPP(999909999) == BOOST_VERSION_NUMBER(99,99,9999));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRR(999) == BOOST_VERSION_NUMBER(9,99,00));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRRPPP(903122) == BOOST_VERSION_NUMBER(9,3,122));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRRPPP(1101002) == BOOST_VERSION_NUMBER(11,1,2));
|
||||
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_DATE(1971,1,1) == BOOST_VERSION_NUMBER(1,1,1));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_YYYYMMDD(19700101) == BOOST_VERSION_NUMBER(0,1,1));
|
||||
|
177
test/platform_windows.cpp
Normal file
177
test/platform_windows.cpp
Normal file
@ -0,0 +1,177 @@
|
||||
/*
|
||||
Copyright James E. King, III - 2017
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <boost/predef/platform.h>
|
||||
|
||||
//
|
||||
// This file is used to verify the BOOST_PLAT_WINDOWS_* logic.
|
||||
//
|
||||
// To exercise all of the combinations the CI build needs many
|
||||
// jobs where it defines all the different possible WINAPI_FAMILY
|
||||
// values on all supported platforms.
|
||||
//
|
||||
|
||||
//
|
||||
// UWP is available on Windows SDK 8.0 or later, or on MinGW-w64 major release 3 or later
|
||||
//
|
||||
#if (defined(__MINGW64__) && (__MINGW64_VERSION_MAJOR >= 3)) || (BOOST_PLAT_WINDOWS_SDK_VERSION >= 9200)
|
||||
#if !BOOST_PLAT_WINDOWS_UWP
|
||||
#error "BOOST_PLAT_WINDOWS_UWP should be available"
|
||||
#endif
|
||||
#else
|
||||
#if BOOST_PLAT_WINDOWS_UWP
|
||||
#error "BOOST_PLAT_WINDOWS_UWP should not be available"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !BOOST_PLAT_WINDOWS_UWP
|
||||
|
||||
//
|
||||
// If BOOST_PLAT_WINDOWS_UWP is not available, none of the other BOOST_PLAT_WINDOWS_* are either
|
||||
// except for BOOST_PLAT_WINDOWS_DESKTOP which is available for backwards compatibility.
|
||||
//
|
||||
|
||||
#if BOOST_OS_WINDOWS && !BOOST_PLAT_WINDOWS_DESKTOP
|
||||
#error "BOOST_PLAT_WINDOWS_DESKTOP should be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_PHONE
|
||||
#error "BOOST_PLAT_WINDOWS_PHONE should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_RUNTIME /* deprecated */
|
||||
#error "BOOST_PLAT_WINDOWS_RUNTIME should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_SERVER
|
||||
#error "BOOST_PLAT_WINDOWS_SERVER should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_STORE
|
||||
#error "BOOST_PLAT_WINDOWS_STORE should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_SYSTEM
|
||||
#error "BOOST_PLAT_WINDOWS_SYSTEM should not be available"
|
||||
#endif
|
||||
|
||||
#else // !BOOST_PLAT_WINDOWS_UWP
|
||||
|
||||
//
|
||||
// If BOOST_PLAT_WINDOWS_UWP is available, and the SDK supports a particular family,
|
||||
// and if WINAPI_FAMILY is set to it, then it and only it should be available.
|
||||
//
|
||||
|
||||
#if !defined(WINAPI_FAMILY)
|
||||
#error "windows_uwp.h should have included <winapifamily.h> which should have defined supported families"
|
||||
#endif
|
||||
|
||||
#if WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP
|
||||
#if !BOOST_PLAT_WINDOWS_DESKTOP
|
||||
#error "BOOST_PLAT_WINDOWS_DESKTOP should be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_PHONE
|
||||
#error "BOOST_PLAT_WINDOWS_PHONE should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_RUNTIME /* deprecated */
|
||||
#error "BOOST_PLAT_WINDOWS_RUNTIME should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_SERVER
|
||||
#error "BOOST_PLAT_WINDOWS_SERVER should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_STORE
|
||||
#error "BOOST_PLAT_WINDOWS_STORE should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_SYSTEM
|
||||
#error "BOOST_PLAT_WINDOWS_SYSTEM should not be available"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#if BOOST_PLAT_WINDOWS_DESKTOP
|
||||
#error "BOOST_PLAT_WINDOWS_DESKTOP should not be available"
|
||||
#endif
|
||||
#if !BOOST_PLAT_WINDOWS_PHONE
|
||||
#error "BOOST_PLAT_WINDOWS_PHONE should be available"
|
||||
#endif
|
||||
#if !BOOST_PLAT_WINDOWS_RUNTIME /* deprecated */
|
||||
#error "BOOST_PLAT_WINDOWS_RUNTIME should be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_SERVER
|
||||
#error "BOOST_PLAT_WINDOWS_SERVER should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_STORE
|
||||
#error "BOOST_PLAT_WINDOWS_STORE should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_SYSTEM
|
||||
#error "BOOST_PLAT_WINDOWS_SYSTEM should not be available"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(WINAPI_FAMILY_SERVER_APP) && WINAPI_FAMILY == WINAPI_FAMILY_SERVER_APP
|
||||
#if BOOST_PLAT_WINDOWS_DESKTOP
|
||||
#error "BOOST_PLAT_WINDOWS_DESKTOP should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_PHONE
|
||||
#error "BOOST_PLAT_WINDOWS_PHONE should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_RUNTIME /* deprecated */
|
||||
#error "BOOST_PLAT_WINDOWS_RUNTIME should not be available"
|
||||
#endif
|
||||
#if !BOOST_PLAT_WINDOWS_SERVER
|
||||
#error "BOOST_PLAT_WINDOWS_SERVER should be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_STORE
|
||||
#error "BOOST_PLAT_WINDOWS_STORE should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_SYSTEM
|
||||
#error "BOOST_PLAT_WINDOWS_SYSTEM should not be available"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Store is WINAPI_FAMILY_APP in MinGW-w64 and in Windows SDK 8.0
|
||||
// then in Windows SDK 8.1 it was deprecated in favor of WINAPI_FAMILY_PC_APP
|
||||
|
||||
#if ((defined(WINAPI_FAMILY_PC_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) || \
|
||||
(defined(WINAPI_FAMILY_APP) && WINAPI_FAMILY == WINAPI_FAMILY_APP))
|
||||
#if BOOST_PLAT_WINDOWS_DESKTOP
|
||||
#error "BOOST_PLAT_WINDOWS_DESKTOP should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_PHONE
|
||||
#error "BOOST_PLAT_WINDOWS_PHONE should not be available"
|
||||
#endif
|
||||
#if !BOOST_PLAT_WINDOWS_RUNTIME /* deprecated */
|
||||
#error "BOOST_PLAT_WINDOWS_RUNTIME should be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_SERVER
|
||||
#error "BOOST_PLAT_WINDOWS_SERVER should not be available"
|
||||
#endif
|
||||
#if !BOOST_PLAT_WINDOWS_STORE
|
||||
#error "BOOST_PLAT_WINDOWS_STORE should be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_SYSTEM
|
||||
#error "BOOST_PLAT_WINDOWS_SYSTEM should not be available"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(WINAPI_FAMILY_SYSTEM_APP) && WINAPI_FAMILY == WINAPI_FAMILY_SYSTEM_APP
|
||||
#if BOOST_PLAT_WINDOWS_DESKTOP
|
||||
#error "BOOST_PLAT_WINDOWS_DESKTOP should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_PHONE
|
||||
#error "BOOST_PLAT_WINDOWS_PHONE should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_RUNTIME /* deprecated */
|
||||
#error "BOOST_PLAT_WINDOWS_RUNTIME should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_SERVER
|
||||
#error "BOOST_PLAT_WINDOWS_SERVER should not be available"
|
||||
#endif
|
||||
#if BOOST_PLAT_WINDOWS_STORE
|
||||
#error "BOOST_PLAT_WINDOWS_STORE should not be available"
|
||||
#endif
|
||||
#if !BOOST_PLAT_WINDOWS_SYSTEM
|
||||
#error "BOOST_PLAT_WINDOWS_SYSTEM should be available"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // !BOOST_PLAT_WINDOWS_UWP
|
29
test/test_cmake/CMakeLists.txt
Normal file
29
test/test_cmake/CMakeLists.txt
Normal file
@ -0,0 +1,29 @@
|
||||
# Copyright Mike Dev 2018
|
||||
# Copyright Rene Rivera 2018
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
# NOTE:
|
||||
# This does NOT run the unit tests for Boost.Predef.
|
||||
# It only tests, if the CMakeLists.txt file in predef's
|
||||
# root directory works as expected (i.e. it provides the
|
||||
# target Boost::predef which in turn provides the
|
||||
# correct include directory )
|
||||
|
||||
# We have very simple cmake requirements we we still require the new style
|
||||
# declarative targets.
|
||||
cmake_minimum_required( VERSION 3.0 )
|
||||
|
||||
project( PredefCMakeSelfTest )
|
||||
|
||||
# Process cmake file at root of library and use
|
||||
# ${CMAKE_CURRENT_BINARY_DIR}/libs/predef as workspace
|
||||
add_subdirectory( ../.. ${CMAKE_CURRENT_BINARY_DIR}/libs/predef )
|
||||
|
||||
# The executable just includes a predef header to verify that it's used.
|
||||
add_executable( predef_cmake_test_prj main.cpp )
|
||||
|
||||
# The executable needs to "use" the Predef "library" to get the usage
|
||||
# requirements added to the executable build.
|
||||
target_link_libraries( predef_cmake_test_prj Boost::predef )
|
19
test/test_cmake/main.cpp
Normal file
19
test/test_cmake/main.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
Copyright Mike Dev 2018
|
||||
Copyright 2018 Rene Rivera
|
||||
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
|
||||
*/
|
||||
|
||||
/*
|
||||
Dummy executable, just to make sure that we can find the Boost Predef header
|
||||
files.
|
||||
*/
|
||||
|
||||
#include <boost/predef.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
62
test/tested_at.cpp
Normal file
62
test/tested_at.cpp
Normal file
@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2011-2017
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/other/workaround.h>
|
||||
#include <exception>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
namespace
|
||||
{
|
||||
struct test_info
|
||||
{
|
||||
std::string value;
|
||||
bool passed;
|
||||
|
||||
test_info(std::string const & v, bool p) : value(v), passed(p) {}
|
||||
test_info(test_info const & o) : value(o.value), passed(o.passed) {}
|
||||
};
|
||||
|
||||
std::vector<test_info> test_results;
|
||||
}
|
||||
|
||||
#define PREDEF_CHECK(X) test_results.push_back(test_info(#X,(X)))
|
||||
|
||||
void test_BOOST_PREDEF_TESTED_AT()
|
||||
{
|
||||
PREDEF_CHECK(BOOST_PREDEF_TESTED_AT(BOOST_VERSION_NUMBER(15,15,15),0xF,0xF,0xF));
|
||||
PREDEF_CHECK(BOOST_PREDEF_TESTED_AT(BOOST_VERSION_NUMBER(1,0,0),1,0,0));
|
||||
PREDEF_CHECK(BOOST_PREDEF_TESTED_AT(BOOST_VERSION_NUMBER(0,9,0),1,0,0));
|
||||
PREDEF_CHECK(BOOST_PREDEF_TESTED_AT(BOOST_VERSION_NUMBER(2,0,0),1,0,0));
|
||||
PREDEF_CHECK(!BOOST_PREDEF_TESTED_AT(BOOST_VERSION_NUMBER_NOT_AVAILABLE,1,0,0));
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
test_BOOST_PREDEF_TESTED_AT();
|
||||
|
||||
unsigned fail_count = 0;
|
||||
std::vector<test_info>::iterator i = test_results.begin();
|
||||
std::vector<test_info>::iterator e = test_results.end();
|
||||
for (; i != e; ++i)
|
||||
{
|
||||
std::cout
|
||||
<< (i->passed ? "[passed]" : "[failed]")
|
||||
<< " " << i->value
|
||||
<< std::endl;
|
||||
fail_count += i->passed ? 0 : 1;
|
||||
}
|
||||
std::cout
|
||||
<< std::endl
|
||||
<< "TOTAL: "
|
||||
<< "passed " << (test_results.size()-fail_count) << ", "
|
||||
<< "failed " << (fail_count) << ", "
|
||||
<< "of " << (test_results.size())
|
||||
<< std::endl;
|
||||
return fail_count;
|
||||
}
|
18
test/tested_at_outdated.cpp
Normal file
18
test/tested_at_outdated.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2011-2017
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#include <boost/predef/version_number.h>
|
||||
#define BOOST_DETECT_OUTDATED_WORKAROUNDS
|
||||
#include <boost/predef/other/workaround.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
#if BOOST_PREDEF_TESTED_AT(BOOST_VERSION_NUMBER(2,0,0),1,0,0)
|
||||
return 1;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
62
test/workaround.cpp
Normal file
62
test/workaround.cpp
Normal file
@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2011-2017
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/other/workaround.h>
|
||||
#include <exception>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
namespace
|
||||
{
|
||||
struct test_info
|
||||
{
|
||||
std::string value;
|
||||
bool passed;
|
||||
|
||||
test_info(std::string const & v, bool p) : value(v), passed(p) {}
|
||||
test_info(test_info const & o) : value(o.value), passed(o.passed) {}
|
||||
};
|
||||
|
||||
std::vector<test_info> test_results;
|
||||
}
|
||||
|
||||
#define PREDEF_CHECK(X) test_results.push_back(test_info(#X,(X)))
|
||||
|
||||
void test_BOOST_PREDEF_WORKAROUND()
|
||||
{
|
||||
PREDEF_CHECK(BOOST_PREDEF_WORKAROUND(BOOST_VERSION_NUMBER(15,15,15),==,0xF,0xF,0xF));
|
||||
PREDEF_CHECK(BOOST_PREDEF_WORKAROUND(BOOST_VERSION_NUMBER(0,9,0),<,1,0,0));
|
||||
PREDEF_CHECK(BOOST_PREDEF_WORKAROUND(BOOST_VERSION_NUMBER(0,9,0),!=,1,0,0));
|
||||
PREDEF_CHECK(BOOST_PREDEF_WORKAROUND(BOOST_VERSION_NUMBER_MIN,<,1,0,0));
|
||||
PREDEF_CHECK(BOOST_PREDEF_WORKAROUND(BOOST_VERSION_NUMBER_MIN,>,0,0,0));
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
test_BOOST_PREDEF_WORKAROUND();
|
||||
|
||||
unsigned fail_count = 0;
|
||||
std::vector<test_info>::iterator i = test_results.begin();
|
||||
std::vector<test_info>::iterator e = test_results.end();
|
||||
for (; i != e; ++i)
|
||||
{
|
||||
std::cout
|
||||
<< (i->passed ? "[passed]" : "[failed]")
|
||||
<< " " << i->value
|
||||
<< std::endl;
|
||||
fail_count += i->passed ? 0 : 1;
|
||||
}
|
||||
std::cout
|
||||
<< std::endl
|
||||
<< "TOTAL: "
|
||||
<< "passed " << (test_results.size()-fail_count) << ", "
|
||||
<< "failed " << (fail_count) << ", "
|
||||
<< "of " << (test_results.size())
|
||||
<< std::endl;
|
||||
return fail_count;
|
||||
}
|
17
test/workaround_strict_config.cpp
Normal file
17
test/workaround_strict_config.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2011-2017
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#include <boost/predef/version_number.h>
|
||||
#define BOOST_STRICT_CONFIG
|
||||
#include <boost/predef/other/workaround.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
#if BOOST_PREDEF_WORKAROUND(BOOST_VERSION_NUMBER_AVAILABLE,==,0,0,1)
|
||||
fail();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
@ -43,7 +43,7 @@ rule check ( expressions + : language ? : true-properties * : false-properties *
|
||||
else
|
||||
{
|
||||
# Create the check run if we don't have one yet.
|
||||
local key = [ MD5 $(language)::$(expression) ] ;
|
||||
local key = [ MD5 "$(language)::$(expression)" ] ;
|
||||
if ! ( $(key) in $(_checks_) )
|
||||
{
|
||||
_checks_ += $(key) ;
|
||||
@ -88,7 +88,7 @@ local rule check_target ( language key : requirements * )
|
||||
local source_path
|
||||
= $(predef_jam:D)/predef_check_cc_as_$(language).$(.$(language).ext) ;
|
||||
local include_path
|
||||
= $(predef_jam:D)/../../include ;
|
||||
= $(predef_jam:D)/../../include $(BOOST_ROOT) ;
|
||||
obj predef_check_cc_$(key)
|
||||
: $(source_path)
|
||||
: <include>$(include_path) $(requirements) ;
|
||||
@ -102,8 +102,8 @@ local rule change_term_to_def ( term )
|
||||
if $(parts[3])
|
||||
{
|
||||
local version_number = [ regex.split $(parts[3]) "[.]" ] ;
|
||||
if ! $(version_number[3]) { version_number += "0" ; }
|
||||
if ! $(version_number[2]) { version_number += "0" ; }
|
||||
if ! $(version_number[3]) { version_number += "0" ; }
|
||||
parts = $(parts[1-2]) BOOST_VERSION_NUMBER($(version_number:J=",")) ;
|
||||
}
|
||||
return <define>CHECK=\"$(parts:J=" ")\" ;
|
||||
|
446
tools/ci/build_log.py
Normal file
446
tools/ci/build_log.py
Normal file
@ -0,0 +1,446 @@
|
||||
|
||||
# Copyright 2008-2019 Rene Rivera
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import re
|
||||
import optparse
|
||||
import time
|
||||
import xml.dom.minidom
|
||||
import xml.dom.pulldom
|
||||
from xml.sax.saxutils import unescape, escape
|
||||
import os.path
|
||||
from pprint import pprint
|
||||
from sys import exit
|
||||
|
||||
|
||||
class BuildOutputXMLParsing(object):
|
||||
'''
|
||||
XML parsing utilities for dealing with the Boost Build output
|
||||
XML format.
|
||||
'''
|
||||
|
||||
def get_child_data(self, root, tag=None, id=None, name=None, strip=False, default=None):
|
||||
return self.get_data(self.get_child(root, tag=tag, id=id, name=name), strip=strip, default=default)
|
||||
|
||||
def get_data(self, node, strip=False, default=None):
|
||||
data = None
|
||||
if node:
|
||||
data_node = None
|
||||
if not data_node:
|
||||
data_node = self.get_child(node, tag='#text')
|
||||
if not data_node:
|
||||
data_node = self.get_child(node, tag='#cdata-section')
|
||||
data = ""
|
||||
while data_node:
|
||||
data += data_node.data
|
||||
data_node = data_node.nextSibling
|
||||
if data_node:
|
||||
if data_node.nodeName != '#text' \
|
||||
and data_node.nodeName != '#cdata-section':
|
||||
data_node = None
|
||||
if not data:
|
||||
data = default
|
||||
else:
|
||||
if strip:
|
||||
data = data.strip()
|
||||
return data
|
||||
|
||||
def get_child(self, root, tag=None, id=None, name=None, type=None):
|
||||
return self.get_sibling(root.firstChild, tag=tag, id=id, name=name, type=type)
|
||||
|
||||
def get_sibling(self, sibling, tag=None, id=None, name=None, type=None):
|
||||
n = sibling
|
||||
while n:
|
||||
found = True
|
||||
if type and found:
|
||||
found = found and type == n.nodeType
|
||||
if tag and found:
|
||||
found = found and tag == n.nodeName
|
||||
if (id or name) and found:
|
||||
found = found and n.nodeType == xml.dom.Node.ELEMENT_NODE
|
||||
if id and found:
|
||||
if n.hasAttribute('id'):
|
||||
found = found and n.getAttribute('id') == id
|
||||
else:
|
||||
found = found and n.hasAttribute(
|
||||
'id') and n.getAttribute('id') == id
|
||||
if name and found:
|
||||
found = found and n.hasAttribute(
|
||||
'name') and n.getAttribute('name') == name
|
||||
if found:
|
||||
return n
|
||||
n = n.nextSibling
|
||||
return None
|
||||
|
||||
|
||||
class BuildOutputProcessor(BuildOutputXMLParsing):
|
||||
|
||||
def __init__(self, inputs):
|
||||
self.test = {}
|
||||
self.target_to_test = {}
|
||||
self.target = {}
|
||||
self.parent = {}
|
||||
self.timestamps = []
|
||||
for input in inputs:
|
||||
self.add_input(input)
|
||||
|
||||
def add_input(self, input):
|
||||
'''
|
||||
Add a single build XML output file to our data.
|
||||
'''
|
||||
events = xml.dom.pulldom.parse(input)
|
||||
context = []
|
||||
for (event, node) in events:
|
||||
if event == xml.dom.pulldom.START_ELEMENT:
|
||||
context.append(node)
|
||||
if node.nodeType == xml.dom.Node.ELEMENT_NODE:
|
||||
x_f = self.x_name_(*context)
|
||||
if x_f:
|
||||
events.expandNode(node)
|
||||
# expanding eats the end element, hence walking us out one level
|
||||
context.pop()
|
||||
# call handler
|
||||
(x_f[1])(node)
|
||||
elif event == xml.dom.pulldom.END_ELEMENT:
|
||||
context.pop()
|
||||
|
||||
def x_name_(self, *context, **kwargs):
|
||||
node = None
|
||||
names = []
|
||||
for c in context:
|
||||
if c:
|
||||
if not isinstance(c, xml.dom.Node):
|
||||
suffix = '_'+c.replace('-', '_').replace('#', '_')
|
||||
else:
|
||||
suffix = '_'+c.nodeName.replace('-', '_').replace('#', '_')
|
||||
node = c
|
||||
names.append('x')
|
||||
names = [x+suffix for x in names]
|
||||
if node:
|
||||
for name in names:
|
||||
if hasattr(self, name):
|
||||
return (name, getattr(self, name))
|
||||
return None
|
||||
|
||||
def x_build_test(self, node):
|
||||
'''
|
||||
Records the initial test information that will eventually
|
||||
get expanded as we process the rest of the results.
|
||||
'''
|
||||
test_node = node
|
||||
test_name = test_node.getAttribute('name')
|
||||
test_target = self.get_child_data(test_node, tag='target', strip=True)
|
||||
# print ">>> %s %s" %(test_name,test_target)
|
||||
self.test[test_name] = {
|
||||
'library': "/".join(test_name.split('/')[0:-1]),
|
||||
'test-name': test_name.split('/')[-1],
|
||||
'test-type': test_node.getAttribute('type').lower(),
|
||||
'test-program': self.get_child_data(test_node, tag='source', strip=True),
|
||||
'target': test_target,
|
||||
'info': self.get_child_data(test_node, tag='info', strip=True),
|
||||
'dependencies': [],
|
||||
'actions': [],
|
||||
}
|
||||
# Add a lookup for the test given the test target.
|
||||
self.target_to_test[self.test[test_name]['target']] = test_name
|
||||
return None
|
||||
|
||||
def x_build_targets_target(self, node):
|
||||
'''
|
||||
Process the target dependency DAG into an ancestry tree so we can look up
|
||||
which top-level library and test targets specific build actions correspond to.
|
||||
'''
|
||||
target_node = node
|
||||
name = self.get_child_data(target_node, tag='name', strip=True)
|
||||
path = self.get_child_data(target_node, tag='path', strip=True)
|
||||
jam_target = self.get_child_data(
|
||||
target_node, tag='jam-target', strip=True)
|
||||
# ~ Map for jam targets to virtual targets.
|
||||
self.target[jam_target] = {
|
||||
'name': name,
|
||||
'path': path
|
||||
}
|
||||
# ~ Create the ancestry.
|
||||
dep_node = self.get_child(self.get_child(
|
||||
target_node, tag='dependencies'), tag='dependency')
|
||||
while dep_node:
|
||||
child = self.get_data(dep_node, strip=True)
|
||||
child_jam_target = '<p%s>%s' % (path, child.split('//', 1)[1])
|
||||
self.parent[child_jam_target] = jam_target
|
||||
dep_node = self.get_sibling(dep_node.nextSibling, tag='dependency')
|
||||
return None
|
||||
|
||||
def x_build_action(self, node):
|
||||
'''
|
||||
Given a build action log, process into the corresponding test log and
|
||||
specific test log sub-part.
|
||||
'''
|
||||
action_node = node
|
||||
name = self.get_child(action_node, tag='name')
|
||||
if name:
|
||||
name = self.get_data(name)
|
||||
# ~ Based on the action, we decide what sub-section the log
|
||||
# ~ should go into.
|
||||
action_type = None
|
||||
if re.match('[^%]+%[^.]+[.](compile)', name):
|
||||
action_type = 'compile'
|
||||
elif re.match('[^%]+%[^.]+[.](link|archive)', name):
|
||||
action_type = 'link'
|
||||
elif re.match('[^%]+%testing[.](capture-output)', name):
|
||||
action_type = 'run'
|
||||
elif re.match('[^%]+%testing[.](expect-failure|expect-success)', name):
|
||||
action_type = 'result'
|
||||
else:
|
||||
# TODO: Enable to see what other actions can be included in the test results.
|
||||
# action_type = None
|
||||
action_type = 'other'
|
||||
# ~ print "+ [%s] %s %s :: %s" %(action_type,name,'','')
|
||||
if action_type:
|
||||
# ~ Get the corresponding test.
|
||||
(target, test) = self.get_test(action_node, type=action_type)
|
||||
# ~ Skip action that have no corresponding test as they are
|
||||
# ~ regular build actions and don't need to show up in the
|
||||
# ~ regression results.
|
||||
if not test:
|
||||
# print "??? [%s] %s %s :: %s" %(action_type,name,target,test)
|
||||
return None
|
||||
# print "+++ [%s] %s %s :: %s" %(action_type,name,target,test)
|
||||
# ~ Collect some basic info about the action.
|
||||
action = {
|
||||
'command': self.get_action_command(action_node, action_type),
|
||||
'output': self.get_action_output(action_node, action_type),
|
||||
'info': self.get_action_info(action_node, action_type)
|
||||
}
|
||||
# ~ For the test result status we find the appropriate node
|
||||
# ~ based on the type of test. Then adjust the result status
|
||||
# ~ accordingly. This makes the result status reflect the
|
||||
# ~ expectation as the result pages post processing does not
|
||||
# ~ account for this inversion.
|
||||
action['type'] = action_type
|
||||
if action_type == 'result':
|
||||
if re.match(r'^compile', test['test-type']):
|
||||
action['type'] = 'compile'
|
||||
elif re.match(r'^link', test['test-type']):
|
||||
action['type'] = 'link'
|
||||
elif re.match(r'^run', test['test-type']):
|
||||
action['type'] = 'run'
|
||||
# ~ The result sub-part we will add this result to.
|
||||
if action_node.getAttribute('status') == '0':
|
||||
action['result'] = 'succeed'
|
||||
else:
|
||||
action['result'] = 'fail'
|
||||
# Add the action to the test.
|
||||
test['actions'].append(action)
|
||||
# Set the test result if this is the result action for the test.
|
||||
if action_type == 'result':
|
||||
test['result'] = action['result']
|
||||
return None
|
||||
|
||||
def x_build_timestamp(self, node):
|
||||
'''
|
||||
The time-stamp goes to the corresponding attribute in the result.
|
||||
'''
|
||||
self.timestamps.append(self.get_data(node).strip())
|
||||
return None
|
||||
|
||||
def get_test(self, node, type=None):
|
||||
'''
|
||||
Find the test corresponding to an action. For testing targets these
|
||||
are the ones pre-declared in the --dump-test option. For libraries
|
||||
we create a dummy test as needed.
|
||||
'''
|
||||
jam_target = self.get_child_data(node, tag='jam-target')
|
||||
base = self.target[jam_target]['name']
|
||||
target = jam_target
|
||||
while target in self.parent:
|
||||
target = self.parent[target]
|
||||
# ~ print "--- TEST: %s ==> %s" %(jam_target,target)
|
||||
# ~ main-target-type is a precise indicator of what the build target is
|
||||
# ~ originally meant to be.
|
||||
# main_type = self.get_child_data(self.get_child(node,tag='properties'),
|
||||
# name='main-target-type',strip=True)
|
||||
main_type = None
|
||||
if main_type == 'LIB' and type:
|
||||
lib = self.target[target]['name']
|
||||
if not lib in self.test:
|
||||
self.test[lib] = {
|
||||
'library': re.search(r'libs/([^/]+)', lib).group(1),
|
||||
'test-name': os.path.basename(lib),
|
||||
'test-type': 'lib',
|
||||
'test-program': os.path.basename(lib),
|
||||
'target': lib
|
||||
}
|
||||
test = self.test[lib]
|
||||
else:
|
||||
target_name_ = self.target[target]['name']
|
||||
if target_name_ in self.target_to_test:
|
||||
test = self.test[self.target_to_test[target_name_]]
|
||||
else:
|
||||
test = None
|
||||
return (base, test)
|
||||
|
||||
# ~ The command executed for the action. For run actions we omit the command
|
||||
# ~ as it's just noise.
|
||||
def get_action_command(self, action_node, action_type):
|
||||
if action_type != 'run':
|
||||
return self.get_child_data(action_node, tag='command')
|
||||
else:
|
||||
return ''
|
||||
|
||||
# ~ The command output.
|
||||
def get_action_output(self, action_node, action_type):
|
||||
return self.get_child_data(action_node, tag='output', default='')
|
||||
|
||||
# ~ Some basic info about the action.
|
||||
def get_action_info(self, action_node, action_type):
|
||||
info = {}
|
||||
# ~ The jam action and target.
|
||||
info['name'] = self.get_child_data(action_node, tag='name')
|
||||
info['path'] = self.get_child_data(action_node, tag='path')
|
||||
# ~ The timing of the action.
|
||||
info['time-start'] = action_node.getAttribute('start')
|
||||
info['time-end'] = action_node.getAttribute('end')
|
||||
info['time-user'] = action_node.getAttribute('user')
|
||||
info['time-system'] = action_node.getAttribute('system')
|
||||
# ~ Testing properties.
|
||||
test_info_prop = self.get_child_data(self.get_child(
|
||||
action_node, tag='properties'), name='test-info')
|
||||
info['always_show_run_output'] = test_info_prop == 'always_show_run_output'
|
||||
# ~ And for compiles some context that may be hidden if using response files.
|
||||
if action_type == 'compile':
|
||||
info['define'] = []
|
||||
define = self.get_child(self.get_child(
|
||||
action_node, tag='properties'), name='define')
|
||||
while define:
|
||||
info['define'].append(self.get_data(define, strip=True))
|
||||
define = self.get_sibling(define.nextSibling, name='define')
|
||||
return info
|
||||
|
||||
|
||||
class BuildConsoleSummaryReport(object):
|
||||
|
||||
HEADER = '\033[35m\033[1m'
|
||||
INFO = '\033[34m'
|
||||
OK = '\033[32m'
|
||||
WARNING = '\033[33m'
|
||||
FAIL = '\033[31m'
|
||||
ENDC = '\033[0m'
|
||||
|
||||
def __init__(self, bop, opt):
|
||||
self.bop = bop
|
||||
|
||||
def generate(self):
|
||||
self.summary_info = {
|
||||
'total': 0,
|
||||
'success': 0,
|
||||
'failed': [],
|
||||
}
|
||||
self.header_print(
|
||||
"======================================================================")
|
||||
self.print_test_log()
|
||||
self.print_summary()
|
||||
self.header_print(
|
||||
"======================================================================")
|
||||
|
||||
@property
|
||||
def failed(self):
|
||||
return len(self.summary_info['failed']) > 0
|
||||
|
||||
def print_test_log(self):
|
||||
self.header_print("Tests run..")
|
||||
self.header_print(
|
||||
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
|
||||
for k in sorted(self.bop.test.keys()):
|
||||
test = self.bop.test[k]
|
||||
if len(test['actions']) > 0:
|
||||
self.summary_info['total'] += 1
|
||||
# print ">>>> {0}".format(test['test-name'])
|
||||
if 'result' in test:
|
||||
succeed = test['result'] == 'succeed'
|
||||
else:
|
||||
succeed = test['actions'][-1]['result'] == 'succeed'
|
||||
if succeed:
|
||||
self.summary_info['success'] += 1
|
||||
else:
|
||||
self.summary_info['failed'].append(test)
|
||||
if succeed:
|
||||
self.ok_print("[PASS] {0}", k)
|
||||
else:
|
||||
self.fail_print("[FAIL] {0}", k)
|
||||
for action in test['actions']:
|
||||
self.print_action(succeed, action)
|
||||
|
||||
def print_action(self, test_succeed, action):
|
||||
'''
|
||||
Print the detailed info of failed or always print tests.
|
||||
'''
|
||||
#self.info_print(">>> {0}",action.keys())
|
||||
if not test_succeed or action['info']['always_show_run_output']:
|
||||
output = action['output'].strip()
|
||||
if output != "":
|
||||
p = self.fail_print if action['result'] == 'fail' else self.p_print
|
||||
self.info_print("")
|
||||
self.info_print(
|
||||
"({0}) {1}", action['info']['name'], action['info']['path'])
|
||||
p("")
|
||||
p("{0}", action['command'].strip())
|
||||
p("")
|
||||
for line in output.splitlines():
|
||||
p("{0}", line.encode('utf-8'))
|
||||
|
||||
def print_summary(self):
|
||||
self.header_print("")
|
||||
self.header_print("Testing summary..")
|
||||
self.header_print(
|
||||
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
|
||||
self.p_print("Total: {0}", self.summary_info['total'])
|
||||
self.p_print("Success: {0}", self.summary_info['success'])
|
||||
if self.failed:
|
||||
self.fail_print("Failed: {0}", len(self.summary_info['failed']))
|
||||
for test in self.summary_info['failed']:
|
||||
self.fail_print(
|
||||
" {0}/{1}", test['library'], test['test-name'])
|
||||
|
||||
def p_print(self, format, *args, **kargs):
|
||||
print(format.format(*args, **kargs))
|
||||
|
||||
def info_print(self, format, *args, **kargs):
|
||||
print(self.INFO+format.format(*args, **kargs)+self.ENDC)
|
||||
|
||||
def header_print(self, format, *args, **kargs):
|
||||
print(self.HEADER+format.format(*args, **kargs)+self.ENDC)
|
||||
|
||||
def ok_print(self, format, *args, **kargs):
|
||||
print(self.OK+format.format(*args, **kargs)+self.ENDC)
|
||||
|
||||
def warn_print(self, format, *args, **kargs):
|
||||
print(self.WARNING+format.format(*args, **kargs)+self.ENDC)
|
||||
|
||||
def fail_print(self, format, *args, **kargs):
|
||||
print(self.FAIL+format.format(*args, **kargs)+self.ENDC)
|
||||
|
||||
|
||||
class Main(object):
|
||||
|
||||
def __init__(self, args=None):
|
||||
op = optparse.OptionParser(
|
||||
usage="%prog [options] input+")
|
||||
op.add_option('--output',
|
||||
help="type of output to generate")
|
||||
(opt, inputs) = op.parse_args(args)
|
||||
bop = BuildOutputProcessor(inputs)
|
||||
output = None
|
||||
if opt.output == 'console':
|
||||
output = BuildConsoleSummaryReport(bop, opt)
|
||||
if output:
|
||||
output.generate()
|
||||
self.failed = output.failed
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
m = Main()
|
||||
if m.failed:
|
||||
exit(-1)
|
1001
tools/ci/common.py
Normal file
1001
tools/ci/common.py
Normal file
File diff suppressed because it is too large
Load Diff
152
tools/ci/library_test.py
Normal file
152
tools/ci/library_test.py
Normal file
@ -0,0 +1,152 @@
|
||||
|
||||
# Copyright Rene Rivera 2016-2019
|
||||
#
|
||||
# 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)
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os.path
|
||||
import shutil
|
||||
import sys
|
||||
from common import toolset_info, main, utils, script_common, ci_cli, set_arg
|
||||
|
||||
__dirname__ = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
|
||||
class script(script_common):
|
||||
'''
|
||||
Main script to test a Boost C++ Library.
|
||||
'''
|
||||
|
||||
def __init__(self, ci_klass, **kargs):
|
||||
script_common.__init__(self, ci_klass, **kargs)
|
||||
|
||||
def init(self, opt, kargs):
|
||||
opt.add_option(
|
||||
'--toolset',
|
||||
help="single toolset to test with")
|
||||
opt.add_option(
|
||||
'--target',
|
||||
help="test target to build for testing, defaults to TARGET or 'minimal'")
|
||||
opt.add_option(
|
||||
'--address-model',
|
||||
help="address model to test, ie 64 or 32")
|
||||
opt.add_option(
|
||||
'--variant',
|
||||
help="variant to test, ie debug, release")
|
||||
set_arg(kargs, 'toolset', os.getenv("TOOLSET"))
|
||||
set_arg(kargs, 'target', os.getenv('TARGET', 'minimal'))
|
||||
set_arg(kargs, 'address_model', os.getenv("ADDRESS_MODEL", None))
|
||||
set_arg(kargs, 'variant', os.getenv("VARIANT", "debug"))
|
||||
set_arg(kargs, 'cxxstd', os.getenv("CXXSTD", None))
|
||||
set_arg(kargs, 'cxxdialect', os.getenv("CXXDIALECT", None))
|
||||
set_arg(kargs, 'cxxdefs', os.getenv("CXXDEFS", None))
|
||||
return kargs
|
||||
|
||||
def start(self):
|
||||
script_common.start(self)
|
||||
# Some setup we need to redo for each invocation.
|
||||
self.b2_dir = os.path.join(self.build_dir, 'b2')
|
||||
|
||||
def command_install(self):
|
||||
script_common.command_install(self)
|
||||
# Fetch & install toolset..
|
||||
utils.log("Install toolset: %s" % (self.toolset))
|
||||
if self.toolset:
|
||||
self.command_install_toolset(self.toolset)
|
||||
|
||||
def command_before_build(self):
|
||||
script_common.command_before_build(self)
|
||||
|
||||
# Fetch dependencies.
|
||||
utils.git_clone('boostorg', 'build', 'develop', repo_dir=self.b2_dir)
|
||||
|
||||
# Create config file for b2 toolset.
|
||||
if not isinstance(self.ci, ci_cli):
|
||||
utils.make_file(os.path.join(self.repo_dir, 'project-config.jam'),
|
||||
"""
|
||||
using %(toolset)s : %(version)s : %(command)s ;
|
||||
""" % {
|
||||
'toolset': toolset_info[self.toolset]['toolset'],
|
||||
'version': toolset_info[self.toolset]['version'],
|
||||
'command': toolset_info[self.toolset]['command'],
|
||||
})
|
||||
|
||||
# # "Convert" boostorg-predef into standalone b2 project.
|
||||
# if os.path.exists(os.path.join(self.repo_dir, 'build.jam')) and not os.path.exists(os.path.join(self.repo_dir, 'project-root.jam')):
|
||||
# os.rename(os.path.join(self.repo_dir, 'build.jam'),
|
||||
# os.path.join(self.repo_dir, 'project-root.jam'))
|
||||
|
||||
def command_build(self):
|
||||
script_common.command_build(self)
|
||||
|
||||
# Set up tools.
|
||||
if not isinstance(self.ci, ci_cli) and toolset_info[self.toolset]['command']:
|
||||
os.environ['PATH'] = os.pathsep.join([
|
||||
os.path.dirname(toolset_info[self.toolset]['command']),
|
||||
os.environ['PATH']])
|
||||
|
||||
# Bootstrap Boost Build engine.
|
||||
os.chdir(self.b2_dir)
|
||||
if sys.platform == 'win32':
|
||||
utils.check_call(".\\bootstrap.bat")
|
||||
else:
|
||||
utils.check_call("./bootstrap.sh")
|
||||
os.environ['PATH'] = os.pathsep.join([self.b2_dir, os.environ['PATH']])
|
||||
os.environ['BOOST_BUILD_PATH'] = self.b2_dir
|
||||
|
||||
# Run the limited tests.
|
||||
print("--- Testing %s ---" % (self.repo_dir))
|
||||
os.chdir(os.path.join(self.repo_dir, 'test'))
|
||||
toolset_to_test = ""
|
||||
if self.toolset:
|
||||
if not isinstance(self.ci, ci_cli):
|
||||
toolset_to_test = toolset_info[self.toolset]['toolset']
|
||||
else:
|
||||
toolset_to_test = self.toolset
|
||||
cxxdefs = []
|
||||
if self.cxxdefs:
|
||||
cxxdefs = ['define=%s' % (d) for d in self.cxxdefs.split(',')]
|
||||
self.b2(
|
||||
'-d1',
|
||||
'-p0',
|
||||
'preserve-test-targets=off',
|
||||
'--dump-tests',
|
||||
'--verbose-test',
|
||||
'--build-dir=%s' % (self.build_dir),
|
||||
'--out-xml=%s' % (os.path.join(self.build_dir, 'regression.xml')),
|
||||
'' if not toolset_to_test else 'toolset=%s' % (toolset_to_test),
|
||||
'' if not self.address_model else 'address-model=%s' % (
|
||||
self.address_model),
|
||||
'variant=%s' % (self.variant),
|
||||
'' if not self.cxxstd else 'cxxstd=%s' % (
|
||||
self.cxxstd),
|
||||
'' if not self.cxxdialect else 'cxxstd-dialect=%s' % (
|
||||
self.cxxdialect),
|
||||
self.target,
|
||||
*cxxdefs
|
||||
)
|
||||
|
||||
# Generate a readable test report.
|
||||
import build_log
|
||||
log_main = build_log.Main([
|
||||
'--output=console',
|
||||
os.path.join(self.build_dir, 'regression.xml')])
|
||||
# And exit with an error if the report contains failures.
|
||||
# This lets the CI notice the error and report a failed build.
|
||||
# And hence trigger the failure machinery, like sending emails.
|
||||
if log_main.failed:
|
||||
self.ci.finish(-1)
|
||||
|
||||
def command_before_cache(self):
|
||||
script_common.command_before_cache(self)
|
||||
os.chdir(self.b2_dir)
|
||||
utils.check_call("git", "clean", "-dfqx")
|
||||
utils.check_call("git", "status", "-bs")
|
||||
# utils.check_call("git","submodule","--quiet","foreach","git","clean","-dfqx")
|
||||
# utils.check_call("git","submodule","foreach","git","status","-bs")
|
||||
|
||||
|
||||
main(script)
|
Reference in New Issue
Block a user