Compare commits

...

11 Commits

Author SHA1 Message Date
9aca7f5b60 Actually guard against use of check/predef.jam. 2024-04-19 09:06:44 -05:00
25a6bb6b2e Guard against using the obsolete predef/check/predef.jam 2024-04-19 09:00:37 -05:00
0fdfb49c3a Merge branch 'develop' 2023-10-31 20:24:41 -05:00
614546d6fa Update from hash_predef, version 1.15. 2023-10-31 20:20:43 -05:00
7f9c798e09 Add support for Microsoft's C++ stdlib (#133)
Add support for Microsoft's C++ stdlib
2023-10-31 07:01:23 -05:00
392e4e7674 Release 1.14. 2022-02-27 14:44:35 -06:00
a12c7fde14 Predef 1.13.1 2021-10-24 17:53:33 -05:00
e3a87328f4 Merge branch 'develop' 2021-02-13 20:33:00 -06:00
c5075828dd Release 1.12 2021-01-06 08:01:05 -06:00
133ae86ef5 Merge branch 'develop' 2020-03-24 21:17:05 -05:00
fe62325d9f Fix bad checks on Boost release archive structure.
The headers on a Boost release are only present at the root. This adds that to the include search path so that the checks can also work on that structure.
2019-08-12 16:21:35 -05:00
10 changed files with 172 additions and 46 deletions

View File

@ -1,13 +1,9 @@
# Copyright Mike Dev 2018
# Copyright René Ferdinand Rivera Morell 2018-2021
# Copyright René Ferdinand Rivera Morell 2018-2023
# 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.
@ -20,12 +16,12 @@
# Only need the basic minimum of project, add_library, and
# target_include_directories commands.
cmake_minimum_required( VERSION 3.0 )
cmake_minimum_required( VERSION 3.5...3.999 )
# Don't set VERSION, 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 LANGUAGES NONE )
# Don't set LANGUAGES as we are multi-language and header only, so it's
# irrelevant.
set( BOOST_PREDEF_VERSION "1.15" )
project( boost_predef VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES NONE )
# Simple INTERFACE, and header only, library target.
add_library( boost_predef INTERFACE )

View File

@ -3,8 +3,16 @@
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
ECHO "error: This module (predef/check/predef.jam) is OBSOLETE. Use predef/tools/check/predef.jam instead." ;
# Hack, to reload check/predef.jam at its new location.
import modules ;
local _loading_ = [ modules.peek modules : .loading ] ;
if $(_loading_[-1]) = $(_loading_[-2])
{
ECHO "error: Recursive loading of this module (predef/check/predef.jam) attempted. The predef/tools/check/predef.jam file is missing." ;
EXIT ;
}
local _loaded_ ;
for local _module_ in [ modules.peek modules : .loaded ]
{

View File

@ -1,5 +1,5 @@
////
Copyright 2014-2021 René Ferdinand Rivera Morell
Copyright 2014-2024 René Ferdinand Rivera Morell
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,15 @@ http://www.boost.org/LICENSE_1_0.txt)
= History
== 1.15.1
* Guard against using the obsolete `predef/check/predef.jam` B2 module.
Instead of using the current `predef/tools/check/predef.jam` module.
== 1.15.0
* Add detection of Microsoft STL (from Henrik Gaßmann).
== 1.14.0
* Add detection of LoongArch (from Zhang Na).

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 2.0.18">
<meta name="generator" content="Asciidoctor 2.0.20">
<meta name="author" content="René Ferdinand Rivera Morell">
<title>Boost.Predef</title>
<style>
@ -1044,6 +1044,7 @@ pre.rouge .ss {
<li><a href="#_boost_lib_std_gnu">4.4.13. <code>BOOST_LIB_STD_GNU</code></a></li>
<li><a href="#_boost_lib_std_stlport">4.4.14. <code>BOOST_LIB_STD_STLPORT</code></a></li>
<li><a href="#_boost_lib_std_ibm">4.4.15. <code>BOOST_LIB_STD_IBM</code></a></li>
<li><a href="#_boost_lib_std_msvc">4.4.16. <code>BOOST_LIB_STD_MSVC</code></a></li>
</ul>
</li>
<li><a href="#_boost_os_operating_system_macros">4.5. <code>BOOST_OS</code> operating system macros</a>
@ -1129,22 +1130,23 @@ pre.rouge .ss {
</li>
<li><a href="#_history">6. History</a>
<ul class="sectlevel2">
<li><a href="#_1_14_0">6.1. 1.14.0</a></li>
<li><a href="#_1_13_1">6.2. 1.13.1</a></li>
<li><a href="#_1_13">6.3. 1.13</a></li>
<li><a href="#_1_12">6.4. 1.12</a></li>
<li><a href="#_1_11">6.5. 1.11</a></li>
<li><a href="#_1_10">6.6. 1.10</a></li>
<li><a href="#_1_9">6.7. 1.9</a></li>
<li><a href="#_1_8">6.8. 1.8</a></li>
<li><a href="#_1_7">6.9. 1.7</a></li>
<li><a href="#_1_6">6.10. 1.6</a></li>
<li><a href="#_1_5">6.11. 1.5</a></li>
<li><a href="#_1_4_1">6.12. 1.4.1</a></li>
<li><a href="#_1_4">6.13. 1.4</a></li>
<li><a href="#_1_3">6.14. 1.3</a></li>
<li><a href="#_1_2">6.15. 1.2</a></li>
<li><a href="#_1_1">6.16. 1.1</a></li>
<li><a href="#_1_15_0">6.1. 1.15.0</a></li>
<li><a href="#_1_14_0">6.2. 1.14.0</a></li>
<li><a href="#_1_13_1">6.3. 1.13.1</a></li>
<li><a href="#_1_13">6.4. 1.13</a></li>
<li><a href="#_1_12">6.5. 1.12</a></li>
<li><a href="#_1_11">6.6. 1.11</a></li>
<li><a href="#_1_10">6.7. 1.10</a></li>
<li><a href="#_1_9">6.8. 1.9</a></li>
<li><a href="#_1_8">6.9. 1.8</a></li>
<li><a href="#_1_7">6.10. 1.7</a></li>
<li><a href="#_1_6">6.11. 1.6</a></li>
<li><a href="#_1_5">6.12. 1.5</a></li>
<li><a href="#_1_4_1">6.13. 1.4.1</a></li>
<li><a href="#_1_4">6.14. 1.4</a></li>
<li><a href="#_1_3">6.15. 1.3</a></li>
<li><a href="#_1_2">6.16. 1.2</a></li>
<li><a href="#_1_1">6.17. 1.1</a></li>
</ul>
</li>
<li><a href="#_to_do">7. To Do</a></li>
@ -4736,6 +4738,43 @@ Version number available as major, minor, and patch.</p>
</tbody>
</table>
</div>
<div class="sect3">
<h4 id="_boost_lib_std_msvc"><a class="anchor" href="#_boost_lib_std_msvc"></a>4.4.16. <code>BOOST_LIB_STD_MSVC</code></h4>
<div class="paragraph">
<p><a href="https://github.com/microsoft/STL">Microsoft&#8217;s C++ Standard Library</a>.
If available version number as major, minor, and patch.
The patch number is derived from <code>_MSVC_STL_UPDATE</code> by taking its five last
digits (see below). This implies that pasting a <code>_MSVC_STL_UPDATE</code> value into
<code>BOOST_VERSION_NUMBER</code> will produce a version number that is directly comparable
to <code>BOOST_LIB_STD_MSVC</code>.</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Symbol</th>
<th class="tableblock halign-left valign-top">Version</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>_MSVC_STL_VERSION</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>detection</strong></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>_MSVC_STL_VERSION</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">VV.R.0</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>_MSVC_STL_UPDATE</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">00.0.0YYYMM</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect2">
<h3 id="_boost_os_operating_system_macros"><a class="anchor" href="#_boost_os_operating_system_macros"></a>4.5. <code>BOOST_OS</code> operating system macros</h3>
@ -5310,7 +5349,7 @@ version 4 is specifically detected.</p>
<div class="sect3">
<h4 id="_boost_os_vms"><a class="anchor" href="#_boost_os_vms"></a>4.5.17. <code>BOOST_OS_VMS</code></h4>
<div class="paragraph">
<p><a href="http://en.wikipedia.org/wiki/Vms">VMS</a> operating system.</p>
<p><a href="http://en.wikipedia.org/wiki/OpenVMS">VMS</a> operating system.</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
@ -7097,6 +7136,9 @@ indicates an ignored digit.</p>
<p><code>BOOST_PREDEF_MAKE_10_VV00(V)</code></p>
</li>
<li>
<p><code>BOOST_PREDEF_MAKE_10_VVR_0PPPPP(V, P)</code>, the second parameter specifies a year-month patch level with the first digit discarded</p>
</li>
<li>
<p><code>BOOST_PREDEF_MAKE_10_VVRR(V)</code></p>
</li>
<li>
@ -7301,7 +7343,17 @@ expressions. It defaults to "c++", but can be any of: "c", "cpp",
<h2 id="_history"><a class="anchor" href="#_history"></a>6. History</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_1_14_0"><a class="anchor" href="#_1_14_0"></a>6.1. 1.14.0</h3>
<h3 id="_1_15_0"><a class="anchor" href="#_1_15_0"></a>6.1. 1.15.0</h3>
<div class="ulist">
<ul>
<li>
<p>Add detection of Microsoft STL (from Henrik Gaßmann).</p>
</li>
</ul>
</div>
</div>
<div class="sect2">
<h3 id="_1_14_0"><a class="anchor" href="#_1_14_0"></a>6.2. 1.14.0</h3>
<div class="ulist">
<ul>
<li>
@ -7311,7 +7363,7 @@ expressions. It defaults to "c++", but can be any of: "c", "cpp",
</div>
</div>
<div class="sect2">
<h3 id="_1_13_1"><a class="anchor" href="#_1_13_1"></a>6.2. 1.13.1</h3>
<h3 id="_1_13_1"><a class="anchor" href="#_1_13_1"></a>6.3. 1.13.1</h3>
<div class="ulist">
<ul>
<li>
@ -7327,7 +7379,7 @@ expressions. It defaults to "c++", but can be any of: "c", "cpp",
</div>
</div>
<div class="sect2">
<h3 id="_1_13"><a class="anchor" href="#_1_13"></a>6.3. 1.13</h3>
<h3 id="_1_13"><a class="anchor" href="#_1_13"></a>6.4. 1.13</h3>
<div class="ulist">
<ul>
<li>
@ -7346,7 +7398,7 @@ expressions. It defaults to "c++", but can be any of: "c", "cpp",
</div>
</div>
<div class="sect2">
<h3 id="_1_12"><a class="anchor" href="#_1_12"></a>6.4. 1.12</h3>
<h3 id="_1_12"><a class="anchor" href="#_1_12"></a>6.5. 1.12</h3>
<div class="ulist">
<ul>
<li>
@ -7375,7 +7427,7 @@ Initial implementation inspired by submission from Mikhail Komarov.</p>
</div>
</div>
<div class="sect2">
<h3 id="_1_11"><a class="anchor" href="#_1_11"></a>6.5. 1.11</h3>
<h3 id="_1_11"><a class="anchor" href="#_1_11"></a>6.6. 1.11</h3>
<div class="ulist">
<ul>
<li>
@ -7403,7 +7455,7 @@ Initial implementation inspired by submission from Mikhail Komarov.</p>
</div>
</div>
<div class="sect2">
<h3 id="_1_10"><a class="anchor" href="#_1_10"></a>6.6. 1.10</h3>
<h3 id="_1_10"><a class="anchor" href="#_1_10"></a>6.7. 1.10</h3>
<div class="ulist">
<ul>
<li>
@ -7428,7 +7480,7 @@ removed in a future release.</p>
</div>
</div>
<div class="sect2">
<h3 id="_1_9"><a class="anchor" href="#_1_9"></a>6.7. 1.9</h3>
<h3 id="_1_9"><a class="anchor" href="#_1_9"></a>6.8. 1.9</h3>
<div class="ulist">
<ul>
<li>
@ -7441,7 +7493,7 @@ removed in a future release.</p>
</div>
</div>
<div class="sect2">
<h3 id="_1_8"><a class="anchor" href="#_1_8"></a>6.8. 1.8</h3>
<h3 id="_1_8"><a class="anchor" href="#_1_8"></a>6.9. 1.8</h3>
<div class="ulist">
<ul>
<li>
@ -7463,7 +7515,7 @@ removed in a future release.</p>
</div>
</div>
<div class="sect2">
<h3 id="_1_7"><a class="anchor" href="#_1_7"></a>6.9. 1.7</h3>
<h3 id="_1_7"><a class="anchor" href="#_1_7"></a>6.10. 1.7</h3>
<div class="ulist">
<ul>
<li>
@ -7479,7 +7531,7 @@ removed in a future release.</p>
</div>
</div>
<div class="sect2">
<h3 id="_1_6"><a class="anchor" href="#_1_6"></a>6.10. 1.6</h3>
<h3 id="_1_6"><a class="anchor" href="#_1_6"></a>6.11. 1.6</h3>
<div class="ulist">
<ul>
<li>
@ -7503,7 +7555,7 @@ Baratov)</p>
</div>
</div>
<div class="sect2">
<h3 id="_1_5"><a class="anchor" href="#_1_5"></a>6.11. 1.5</h3>
<h3 id="_1_5"><a class="anchor" href="#_1_5"></a>6.12. 1.5</h3>
<div class="ulist">
<ul>
<li>
@ -7522,7 +7574,7 @@ version instead of the varied product versions.</p>
</div>
</div>
<div class="sect2">
<h3 id="_1_4_1"><a class="anchor" href="#_1_4_1"></a>6.12. 1.4.1</h3>
<h3 id="_1_4_1"><a class="anchor" href="#_1_4_1"></a>6.13. 1.4.1</h3>
<div class="ulist">
<ul>
<li>
@ -7535,7 +7587,7 @@ version instead of the varied product versions.</p>
</div>
</div>
<div class="sect2">
<h3 id="_1_4"><a class="anchor" href="#_1_4"></a>6.13. 1.4</h3>
<h3 id="_1_4"><a class="anchor" href="#_1_4"></a>6.14. 1.4</h3>
<div class="ulist">
<ul>
<li>
@ -7556,7 +7608,7 @@ use cases. And changed the BBv2 check support to use compile only checks.</p>
</div>
</div>
<div class="sect2">
<h3 id="_1_3"><a class="anchor" href="#_1_3"></a>6.14. 1.3</h3>
<h3 id="_1_3"><a class="anchor" href="#_1_3"></a>6.15. 1.3</h3>
<div class="ulist">
<ul>
<li>
@ -7581,7 +7633,7 @@ use cases. And changed the BBv2 check support to use compile only checks.</p>
</div>
</div>
<div class="sect2">
<h3 id="_1_2"><a class="anchor" href="#_1_2"></a>6.15. 1.2</h3>
<h3 id="_1_2"><a class="anchor" href="#_1_2"></a>6.16. 1.2</h3>
<div class="ulist">
<ul>
<li>
@ -7605,7 +7657,7 @@ checks.</p>
</div>
</div>
<div class="sect2">
<h3 id="_1_1"><a class="anchor" href="#_1_1"></a>6.16. 1.1</h3>
<h3 id="_1_1"><a class="anchor" href="#_1_1"></a>6.17. 1.1</h3>
<div class="ulist">
<ul>
<li>

View File

@ -708,6 +708,8 @@ include::../include/boost/predef/library/std/stlport.h[tag=reference]
include::../include/boost/predef/library/std/vacpp.h[tag=reference]
include::../include/boost/predef/library/std/msvc.h[tag=reference]
:leveloffset: -3
=== `BOOST_OS` operating system macros

View File

@ -16,6 +16,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#include <boost/predef/library/std/libcomo.h>
#include <boost/predef/library/std/modena.h>
#include <boost/predef/library/std/msl.h>
#include <boost/predef/library/std/msvc.h>
#include <boost/predef/library/std/roguewave.h>
#include <boost/predef/library/std/sgi.h>
#include <boost/predef/library/std/stdcpp3.h>

View File

@ -0,0 +1,53 @@
/*
Copyright Henrik S. Gaßmann 2023
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_STD_MSVC_H
#define BOOST_PREDEF_LIBRARY_STD_MSVC_H
#include <boost/predef/library/std/_prefix.h>
#include <boost/predef/version_number.h>
#include <boost/predef/make.h>
/* tag::reference[]
= `BOOST_LIB_STD_MSVC`
https://github.com/microsoft/STL[Microsoft's {CPP} Standard Library].
If available version number as major, minor, and patch.
The patch number is derived from `_MSVC_STL_UPDATE` by taking its five last
digits (see below). This implies that pasting a `_MSVC_STL_UPDATE` value into
`BOOST_VERSION_NUMBER` will produce a version number that is directly comparable
to `BOOST_LIB_STD_MSVC`.
[options="header"]
|===
| {predef_symbol} | {predef_version}
| `+_MSVC_STL_VERSION+` | {predef_detection}
| `+_MSVC_STL_VERSION+` | VV.R.0
| `+_MSVC_STL_UPDATE+` | 00.0.0YYYMM
|===
*/ // end::reference[]
#define BOOST_LIB_STD_MSVC BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(_MSVC_STL_VERSION)
# undef BOOST_LIB_STD_MSVC
# define BOOST_LIB_STD_MSVC BOOST_PREDEF_MAKE_10_VVR_0PPPPP(_MSVC_STL_VERSION, _MSVC_STL_UPDATE)
#endif
#if BOOST_LIB_STD_MSVC
# define BOOST_LIB_STD_MSVC_AVAILABLE
#endif
#define BOOST_LIB_STD_MSVC_NAME "Microsoft stdlib"
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_MSVC, BOOST_LIB_STD_MSVC_NAME)

View File

@ -106,6 +106,10 @@ Macros are:
*/ // end::reference[]
#define BOOST_PREDEF_MAKE_10_VV00(V) BOOST_VERSION_NUMBER(((V)/100)%100,0,0)
/* tag::reference[]
* `BOOST_PREDEF_MAKE_10_VVR_0PPPPP(V, P)`, the second parameter specifies a year-month patch level with the first digit discarded
*/ // end::reference[]
#define BOOST_PREDEF_MAKE_10_VVR_0PPPPP(V, P) BOOST_VERSION_NUMBER(((V)/10)%100,(V)%10,(P)%100000)
/* tag::reference[]
* `BOOST_PREDEF_MAKE_10_VVRR(V)`
*/ // end::reference[]
#define BOOST_PREDEF_MAKE_10_VVRR(V) BOOST_VERSION_NUMBER(((V)/100)%100,(V)%100,0)

View File

@ -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,14,0)
#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,15,1)
#endif

View File

@ -54,6 +54,7 @@ void test_BOOST_VERSION_NUMBER()
/* PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRR00PP00(9999009900ull) == BOOST_VERSION_NUMBER(99,99,99)); */
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRR0PP00(999909900) == BOOST_VERSION_NUMBER(99,99,99));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VV00(9900) == BOOST_VERSION_NUMBER(99,00,00));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVR_0PPPPP(999,299999) == BOOST_VERSION_NUMBER(99,9,99999));
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));