mirror of
https://github.com/boostorg/predef.git
synced 2025-07-30 19:57:14 +02:00
Merge branch 'develop'
This commit is contained in:
109
.travis.yml
109
.travis.yml
@ -1,71 +1,98 @@
|
|||||||
language: cpp
|
# 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:
|
notifications:
|
||||||
email:
|
email:
|
||||||
recipients:
|
recipients:
|
||||||
- grafikrobot@gmail.com
|
- grafikrobot@gmail.com
|
||||||
irc:
|
|
||||||
channels:
|
|
||||||
- "chat.freenode.net#boost"
|
|
||||||
template:
|
|
||||||
- "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}"
|
|
||||||
|
|
||||||
|
# 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
|
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:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
- TRAVIS_EMPTY_JOB_WORKAROUND=true
|
- 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:
|
matrix:
|
||||||
exclude:
|
exclude:
|
||||||
- env: TRAVIS_EMPTY_JOB_WORKAROUND=true
|
- env: TRAVIS_EMPTY_JOB_WORKAROUND=true
|
||||||
include:
|
include:
|
||||||
- env: TOOLSET=clang-3.4
|
- env: TOOLSET=clang-3.4
|
||||||
os: linux
|
|
||||||
dist: precise
|
|
||||||
- env: TOOLSET=clang-3.5
|
- env: TOOLSET=clang-3.5
|
||||||
os: linux
|
|
||||||
dist: precise
|
|
||||||
- env: TOOLSET=clang-3.6
|
- env: TOOLSET=clang-3.6
|
||||||
os: linux
|
- env: TOOLSET=clang-3.7
|
||||||
dist: precise
|
- env: TOOLSET=clang-3.8
|
||||||
|
- env: TOOLSET=clang-3.9
|
||||||
- env: TOOLSET=gcc-4.7
|
- env: TOOLSET=gcc-4.7
|
||||||
os: linux
|
|
||||||
dist: precise
|
|
||||||
- env: TOOLSET=gcc-4.8
|
- env: TOOLSET=gcc-4.8
|
||||||
os: linux
|
|
||||||
dist: precise
|
|
||||||
- env: TOOLSET=gcc-4.9
|
- env: TOOLSET=gcc-4.9
|
||||||
os: linux
|
- env: TOOLSET=gcc-5
|
||||||
dist: precise
|
- env: TOOLSET=gcc-6
|
||||||
- env: TOOLSET=gcc-5.1
|
|
||||||
os: linux
|
|
||||||
dist: precise
|
|
||||||
- env: TOOLSET=xcode-6.1
|
- env: TOOLSET=xcode-6.1
|
||||||
os: osx
|
os: osx
|
||||||
- env: TOOLSET=xcode-6.2
|
|
||||||
os: osx
|
|
||||||
osx_image: beta-xcode6.2
|
|
||||||
- env: TOOLSET=xcode-6.3
|
|
||||||
os: osx
|
|
||||||
osx_image: beta-xcode6.3
|
|
||||||
- env: TOOLSET=xcode-6.4
|
- env: TOOLSET=xcode-6.4
|
||||||
os: osx
|
os: osx
|
||||||
osx_image: xcode6.4
|
osx_image: xcode6.4
|
||||||
- env: TOOLSET=xcode-7.0
|
- env: TOOLSET=xcode-7.3
|
||||||
os: osx
|
os: osx
|
||||||
osx_image: xcode7
|
osx_image: xcode7.3
|
||||||
- env: TOOLSET=xcode-7.1
|
- env: TOOLSET=xcode-8.0
|
||||||
os: osx
|
os: osx
|
||||||
osx_image: xcode7.1
|
osx_image: xcode8
|
||||||
- env: TOOLSET=xcode-7.2
|
|
||||||
os: osx
|
|
||||||
osx_image: xcode7.2
|
|
||||||
|
|
||||||
before_install: wget "https://raw.githubusercontent.com/boostorg/regression/develop/ci/src/script.py"
|
# These are the standard steps to bootstrap the Boost CI scripts
|
||||||
install: python script.py install
|
# and to forward the actions to the scripts.
|
||||||
before_script: python script.py before_script
|
before_install:
|
||||||
script: python script.py script
|
# Fetch the scripts to do the actual building/testing.
|
||||||
after_success: python script.py after_success
|
- |
|
||||||
after_failure: python script.py after_failure
|
wget "https://raw.githubusercontent.com/boostorg/regression/develop/ci/src/ci_boost_common.py" -P ..
|
||||||
after_script: python script.py after_script
|
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
|
||||||
|
54
appveyor.yml
54
appveyor.yml
@ -1,10 +1,29 @@
|
|||||||
|
# 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:
|
notifications:
|
||||||
- provider: Email
|
- provider: Email
|
||||||
to:
|
to:
|
||||||
- grafikrobot@gmail.com
|
- grafikrobot@gmail.com
|
||||||
on_build_status_changed: true
|
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:
|
environment:
|
||||||
|
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: -t7z -m0=lzma2 -mx=3
|
||||||
matrix:
|
matrix:
|
||||||
- TOOLSET: vs-2008
|
- TOOLSET: vs-2008
|
||||||
platform: 32
|
platform: 32
|
||||||
@ -21,22 +40,33 @@ environment:
|
|||||||
- TOOLSET: vs-2015
|
- TOOLSET: vs-2015
|
||||||
platform: 64
|
platform: 64
|
||||||
|
|
||||||
|
# We can also set up configurations for testing which map to
|
||||||
|
# the b2 build variants.
|
||||||
configuration:
|
configuration:
|
||||||
- debug
|
- debug
|
||||||
- release
|
- release
|
||||||
|
|
||||||
|
# These are the standard steps to bootstrap the Boost CI scripts
|
||||||
|
# and to forward the actions to the scripts.
|
||||||
init:
|
init:
|
||||||
|
# Fetch the scripts to do the actual building/testing.
|
||||||
- cd %APPVEYOR_BUILD_FOLDER%/..
|
- cd %APPVEYOR_BUILD_FOLDER%/..
|
||||||
- appveyor DownloadFile "https://raw.githubusercontent.com/boostorg/regression/develop/ci/src/script.py"
|
- appveyor DownloadFile "https://raw.githubusercontent.com/boostorg/regression/develop/ci/src/ci_boost_common.py"
|
||||||
- dir
|
- appveyor DownloadFile "https://raw.githubusercontent.com/boostorg/regression/develop/ci/src/ci_boost_library_test.py"
|
||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
install: python ../script.py install
|
install: python ../ci_boost_library_test.py install
|
||||||
before_build: python ../script.py before_build
|
before_build: python ../ci_boost_library_test.py before_build
|
||||||
build_script: python ../script.py build_script
|
build_script: python ../ci_boost_library_test.py build_script
|
||||||
after_build: python ../script.py after_build
|
after_build: python ../ci_boost_library_test.py after_build
|
||||||
before_test: python ../script.py before_test
|
before_test: python ../ci_boost_library_test.py before_test
|
||||||
test_script: python ../script.py test_script
|
test_script: python ../ci_boost_library_test.py test_script
|
||||||
after_test: python ../script.py after_test
|
after_test: python ../ci_boost_library_test.py after_test
|
||||||
on_success: python ../script.py on_success
|
on_success: python ../ci_boost_library_test.py on_success
|
||||||
on_failure: python ../script.py on_failure
|
on_failure: python ../ci_boost_library_test.py on_failure
|
||||||
on_finish: python ../script.py on_finish
|
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
|
||||||
|
@ -7,6 +7,13 @@ http://www.boost.org/LICENSE_1_0.txt)
|
|||||||
|
|
||||||
[section History]
|
[section History]
|
||||||
|
|
||||||
|
[heading 1.5]
|
||||||
|
|
||||||
|
* Fix Intel C/C++ compiler version specification.
|
||||||
|
* Add `BOOST_VERSION_NUMBER_MAJOR`, `BOOST_VERSION_NUMBER_MINOR`,
|
||||||
|
`BOOST_VERSION_NUMBER_PATCH` macros to extract components from valid version
|
||||||
|
numbers.
|
||||||
|
|
||||||
[heading 1.4.1]
|
[heading 1.4.1]
|
||||||
|
|
||||||
* Small fixes for some redefinition errors, and mispelled macros.
|
* Small fixes for some redefinition errors, and mispelled macros.
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
[article Boost.Predef
|
[article Boost.Predef
|
||||||
[quickbook 1.7]
|
[quickbook 1.7]
|
||||||
[version 1.4.1]
|
[version 1.5]
|
||||||
[authors [Rivera, Rene]]
|
[authors [Rivera, Rene]]
|
||||||
[copyright 2005, 2008-2016 Rene Rivera]
|
[copyright 2005-2016 Rene Rivera]
|
||||||
[copyright 2015 Charly Chevalier]
|
[copyright 2015 Charly Chevalier]
|
||||||
[copyright 2015 Joel Falcou]
|
[copyright 2015 Joel Falcou]
|
||||||
[purpose Identification and specification of predefined macros.]
|
[purpose Identification and specification of predefined macros.]
|
||||||
|
@ -25,7 +25,8 @@ Version number available as major, minor, and patch.
|
|||||||
[[`__ICC`] [__predef_detection__]]
|
[[`__ICC`] [__predef_detection__]]
|
||||||
[[`__ECC`] [__predef_detection__]]
|
[[`__ECC`] [__predef_detection__]]
|
||||||
|
|
||||||
[[`__INTEL_COMPILER`] [V.R.P]]
|
[[`__INTEL_COMPILER`] [V.R]]
|
||||||
|
[[`__INTEL_COMPILER` and `__INTEL_COMPILER_UPDATE`] [V.R.P]]
|
||||||
]
|
]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -33,8 +34,14 @@ Version number available as major, minor, and patch.
|
|||||||
|
|
||||||
#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || \
|
#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || \
|
||||||
defined(__ECC)
|
defined(__ECC)
|
||||||
|
# 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)), \
|
||||||
|
BOOST_VERSION_NUMBER_MINOR(BOOST_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER)), \
|
||||||
|
__INTEL_COMPILER_UPDATE)
|
||||||
|
# endif
|
||||||
# if !defined(BOOST_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER)
|
# if !defined(BOOST_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER)
|
||||||
# define BOOST_COMP_INTEL_DETECTION BOOST_PREDEF_MAKE_10_VRP(__INTEL_COMPILER)
|
# define BOOST_COMP_INTEL_DETECTION BOOST_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER)
|
||||||
# endif
|
# endif
|
||||||
# if !defined(BOOST_COMP_INTEL_DETECTION)
|
# if !defined(BOOST_COMP_INTEL_DETECTION)
|
||||||
# define BOOST_COMP_INTEL_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
|
# define BOOST_COMP_INTEL_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
|
||||||
|
@ -10,6 +10,6 @@ http://www.boost.org/LICENSE_1_0.txt)
|
|||||||
|
|
||||||
#include <boost/predef/version_number.h>
|
#include <boost/predef/version_number.h>
|
||||||
|
|
||||||
#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,4,1)
|
#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,5,0)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright Rene Rivera 2005, 2008-2013
|
Copyright Rene Rivera 2005-2016
|
||||||
Distributed under the Boost Software License, Version 1.0.
|
Distributed under the Boost Software License, Version 1.0.
|
||||||
(See accompanying file LICENSE_1_0.txt or copy at
|
(See accompanying file LICENSE_1_0.txt or copy at
|
||||||
http://www.boost.org/LICENSE_1_0.txt)
|
http://www.boost.org/LICENSE_1_0.txt)
|
||||||
@ -50,4 +50,23 @@ Defines standard version numbers, with these properties:
|
|||||||
#define BOOST_VERSION_NUMBER_NOT_AVAILABLE \
|
#define BOOST_VERSION_NUMBER_NOT_AVAILABLE \
|
||||||
BOOST_VERSION_NUMBER_ZERO
|
BOOST_VERSION_NUMBER_ZERO
|
||||||
|
|
||||||
|
/*`
|
||||||
|
``
|
||||||
|
BOOST_VERSION_NUMBER_MAJOR(N), BOOST_VERSION_NUMBER_MINOR(N), BOOST_VERSION_NUMBER_PATCH(N)
|
||||||
|
``
|
||||||
|
|
||||||
|
The macros extract the major, minor, and patch portion from a well formed
|
||||||
|
version number resulting in a preprocessor expression in the range of
|
||||||
|
\[0,99\] or \[0,99999\] for the major and minor, or patch numbers
|
||||||
|
respectively.
|
||||||
|
*/
|
||||||
|
#define BOOST_VERSION_NUMBER_MAJOR(N) \
|
||||||
|
( ((N)/10000000)%100 )
|
||||||
|
|
||||||
|
#define BOOST_VERSION_NUMBER_MINOR(N) \
|
||||||
|
( ((N)/100000)%100 )
|
||||||
|
|
||||||
|
#define BOOST_VERSION_NUMBER_PATCH(N) \
|
||||||
|
( (N)%100000 )
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -34,6 +34,27 @@ void test_BOOST_VERSION_NUMBER()
|
|||||||
PREDEF_CHECK(BOOST_VERSION_NUMBER(100,99,99999) != 1009999999L);
|
PREDEF_CHECK(BOOST_VERSION_NUMBER(100,99,99999) != 1009999999L);
|
||||||
PREDEF_CHECK(BOOST_VERSION_NUMBER(100,99,99999) == 9999999L);
|
PREDEF_CHECK(BOOST_VERSION_NUMBER(100,99,99999) == 9999999L);
|
||||||
PREDEF_CHECK(BOOST_VERSION_NUMBER(100,100,100000) == 0L);
|
PREDEF_CHECK(BOOST_VERSION_NUMBER(100,100,100000) == 0L);
|
||||||
|
|
||||||
|
PREDEF_CHECK(
|
||||||
|
BOOST_VERSION_NUMBER_MAJOR(BOOST_VERSION_NUMBER(0,0,0)) == 0);
|
||||||
|
PREDEF_CHECK(
|
||||||
|
BOOST_VERSION_NUMBER_MAJOR(BOOST_VERSION_NUMBER(3,3,3)) == 3);
|
||||||
|
PREDEF_CHECK(
|
||||||
|
BOOST_VERSION_NUMBER_MAJOR(BOOST_VERSION_NUMBER(99,99,99999)) == 99);
|
||||||
|
|
||||||
|
PREDEF_CHECK(
|
||||||
|
BOOST_VERSION_NUMBER_MINOR(BOOST_VERSION_NUMBER(0,0,0)) == 0);
|
||||||
|
PREDEF_CHECK(
|
||||||
|
BOOST_VERSION_NUMBER_MINOR(BOOST_VERSION_NUMBER(3,3,3)) == 3);
|
||||||
|
PREDEF_CHECK(
|
||||||
|
BOOST_VERSION_NUMBER_MINOR(BOOST_VERSION_NUMBER(99,99,99999)) == 99);
|
||||||
|
|
||||||
|
PREDEF_CHECK(
|
||||||
|
BOOST_VERSION_NUMBER_PATCH(BOOST_VERSION_NUMBER(0,0,0)) == 0);
|
||||||
|
PREDEF_CHECK(
|
||||||
|
BOOST_VERSION_NUMBER_PATCH(BOOST_VERSION_NUMBER(3,3,3)) == 3);
|
||||||
|
PREDEF_CHECK(
|
||||||
|
BOOST_VERSION_NUMBER_PATCH(BOOST_VERSION_NUMBER(99,99,99999)) == 99999);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
Reference in New Issue
Block a user