forked from boostorg/predef
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.
This commit is contained in:
@@ -25,7 +25,8 @@ Version number available as major, minor, and patch.
|
||||
[[`__ICC`] [__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) || \
|
||||
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)
|
||||
# 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
|
||||
# if !defined(BOOST_COMP_INTEL_DETECTION)
|
||||
# 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>
|
||||
|
||||
#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,4,1)
|
||||
#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,5,0)
|
||||
|
||||
#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.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
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 \
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user