mirror of
https://github.com/boostorg/predef.git
synced 2025-07-29 19:47:12 +02:00
9
check/build.jam
Normal file
9
check/build.jam
Normal file
@ -0,0 +1,9 @@
|
||||
# Copyright Rene Rivera 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)
|
||||
|
||||
exe predef_check_as_c : predef_check_as_c.c : <include>../include ;
|
||||
exe predef_check_as_cpp : predef_check_as_cpp.cpp : <include>../include ;
|
||||
exe predef_check_as_objc : predef_check_as_objc.m : <include>../include ;
|
||||
exe predef_check_as_objcpp : predef_check_as_objcpp.mm : <include>../include ;
|
106
check/predef.jam
Normal file
106
check/predef.jam
Normal file
@ -0,0 +1,106 @@
|
||||
# Copyright Rene Rivera 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)
|
||||
|
||||
# Defines rules that provide requirements based on checking
|
||||
# conditions using Boost Predef definitions and version numbers.
|
||||
|
||||
import modules ;
|
||||
import project ;
|
||||
import feature ;
|
||||
import string ;
|
||||
import toolset ;
|
||||
import modules ;
|
||||
import path ;
|
||||
|
||||
# Create a project for our targets.
|
||||
project.extension predef check ;
|
||||
|
||||
# Feature to pass check expressions to check programs.
|
||||
feature.feature predef-expression : : free ;
|
||||
|
||||
# Check programs. Each needs to be compiled for different languages
|
||||
# even though they are all the same source code.
|
||||
local rule check_target ( language : ext )
|
||||
{
|
||||
# Need to use absolute paths because we don't know the
|
||||
# context of the invocation which affects where the paths
|
||||
# originate from.
|
||||
local predef_jam
|
||||
= [ modules.binding $(__name__) ] ;
|
||||
local source_path
|
||||
= $(predef_jam:D)/predef_check_as_$(language).$(ext) ;
|
||||
local include_path
|
||||
= $(predef_jam:D)/../include ;
|
||||
_check_exe_($(language)) = [
|
||||
exe predef_check_as_$(language)
|
||||
: $(source_path)
|
||||
: <include>$(include_path) ] ;
|
||||
explicit predef_check_as_$(language) ;
|
||||
}
|
||||
check_target c : c ;
|
||||
check_target cpp : cpp ;
|
||||
check_target objc : m ;
|
||||
check_target objcpp : mm ;
|
||||
|
||||
# Checks the expressions and when used evaluates to the true-properties
|
||||
# if the expressions are all true. Otherwise evaluates to the
|
||||
# false-properties.
|
||||
rule check ( expressions + : language ? : true-properties * : false-properties * )
|
||||
{
|
||||
# Default to C++ on the check context.
|
||||
language ?= cpp ;
|
||||
|
||||
local project_target = [ project.target $(__name__) ] ;
|
||||
project.push-current $(project_target) ;
|
||||
local result ;
|
||||
for expression in $(expressions)
|
||||
{
|
||||
# The check program to use.
|
||||
local exe_target = [ $(_check_exe_($(language))).name ] ;
|
||||
exe_target = /check/predef//$(exe_target) ;
|
||||
|
||||
# Create the check run if we don't have one yet.
|
||||
local key = [ MD5 $(language)::$(expression) ] ;
|
||||
if ! ( $(key) in $(_checks_) )
|
||||
{
|
||||
_checks_ += $(key) ;
|
||||
make
|
||||
$(key).txt :
|
||||
$(exe_target) :
|
||||
@$(__name__).predef_check_action :
|
||||
<predef-expression>$(expression) ;
|
||||
explicit
|
||||
$(key).txt ;
|
||||
}
|
||||
|
||||
local check_target = [ check-target-builds
|
||||
/check/predef//$(key).txt $(expression)
|
||||
: $(true-properties)
|
||||
: $(false-properties) ] ;
|
||||
|
||||
result += $(check_target) ;
|
||||
}
|
||||
project.pop-current ;
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
# Checks the expressions and when used evaluates to <build>no
|
||||
# if the expressions are all false. Otherwise evaluates to the
|
||||
# nothing.
|
||||
rule require ( expressions + : language ? )
|
||||
{
|
||||
return [ check $(expressions) : $(language) : : <build>no ] ;
|
||||
}
|
||||
|
||||
rule predef_check_action ( targets + : sources + : props * )
|
||||
{
|
||||
PREDEF_CHECK_EXPRESSION on $(targets)
|
||||
= [ feature.get-values <predef-expression> : $(props) ] ;
|
||||
}
|
||||
|
||||
actions predef_check_action bind PREDEF_CHECK_EXPRESSION
|
||||
{
|
||||
$(>) "$(PREDEF_CHECK_EXPRESSION)" > $(<)
|
||||
}
|
119
check/predef_check_as_c.c
Normal file
119
check/predef_check_as_c.c
Normal file
@ -0,0 +1,119 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2011-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)
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define BOOST_PREDEF_INTERNAL_GENERATE_TESTS
|
||||
|
||||
typedef struct predef_info
|
||||
{
|
||||
unsigned tag;
|
||||
const char * name;
|
||||
const char * description;
|
||||
unsigned value;
|
||||
} predef_info;
|
||||
|
||||
predef_info first_predef_info = { 0x43210DEF , "-" , "-" , 0xFFFFFFFF };
|
||||
|
||||
#define BOOST_PREDEF_DECLARE_TEST(x,s) \
|
||||
predef_info x##_predef_info = { 0x67890DEF , #x , s , x };
|
||||
#include <boost/predef.h>
|
||||
|
||||
predef_info last_predef_info = { 0xFFFFFFFF , "-" , "-" , 0x43210DEF };
|
||||
|
||||
int predef_info_compare(const void * a, const void * b)
|
||||
{
|
||||
const predef_info ** i = (const predef_info **)a;
|
||||
const predef_info ** j = (const predef_info **)b;
|
||||
return strcmp((*i)->name,(*j)->name);
|
||||
}
|
||||
|
||||
const char * str_token(const char ** str, const char * space)
|
||||
{
|
||||
unsigned span;
|
||||
char * token;
|
||||
for (; **str != 0; *str += 1)
|
||||
{
|
||||
if (0 == strchr(space, **str))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
span = strcspn(*str, space);
|
||||
token = (char *)malloc(span+1);
|
||||
strncpy(token, *str, span);
|
||||
token[span] = 0;
|
||||
for (*str += span; **str != 0; *str += 1)
|
||||
{
|
||||
if (0 == strchr(space, **str))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
||||
const char * whitespace = " ";
|
||||
const char * dot = ".";
|
||||
|
||||
int main(int argc, const char ** argv)
|
||||
{
|
||||
unsigned x = 0;
|
||||
int argi = 1;
|
||||
predef_info ** predefs = 0;
|
||||
unsigned predef_count = 0;
|
||||
unsigned * i = &first_predef_info.tag;
|
||||
unsigned * e = &last_predef_info.tag;
|
||||
while (i < e)
|
||||
{
|
||||
i += 1;
|
||||
if (*i == 0x67890DEF)
|
||||
{
|
||||
predef_count += 1;
|
||||
predefs = (predef_info**)realloc(predefs,predef_count*sizeof(predef_info*));
|
||||
predefs[predef_count-1] = (predef_info*)i;
|
||||
}
|
||||
}
|
||||
qsort(predefs,predef_count,sizeof(predef_info*),predef_info_compare);
|
||||
for (argi = 1; argi < argc; ++argi)
|
||||
{
|
||||
const char * exp = argv[argi];
|
||||
const char * exp_name = str_token(&exp, whitespace);
|
||||
const char * exp_op = str_token(&exp, whitespace);
|
||||
const char * exp_val = str_token(&exp, whitespace);
|
||||
unsigned exp_version = 0;
|
||||
if (*exp_val != 0)
|
||||
{
|
||||
exp = exp_val;
|
||||
const char * exp_val_a = str_token(&exp, dot);
|
||||
const char * exp_val_b = str_token(&exp, dot);
|
||||
const char * exp_val_c = str_token(&exp, dot);
|
||||
exp_version = BOOST_VERSION_NUMBER(atoi(exp_val_a), atoi(exp_val_b),atoi(exp_val_c));
|
||||
}
|
||||
for (x = 0; x < predef_count; ++x)
|
||||
{
|
||||
if (*exp_op == 0 &&
|
||||
predefs[x]->value == 0 &&
|
||||
strcmp(exp_name, predefs[x]->name) == 0)
|
||||
{
|
||||
return argi;
|
||||
}
|
||||
else if (*exp_op != 0 && *exp_val != 0 &&
|
||||
strcmp(exp_name, predefs[x]->name) == 0)
|
||||
{
|
||||
if (0 == strcmp(">",exp_op) && !(predefs[x]->value > exp_version)) return argi;
|
||||
if (0 == strcmp("<",exp_op) && !(predefs[x]->value < exp_version)) return argi;
|
||||
if (0 == strcmp(">=",exp_op) && !(predefs[x]->value >= exp_version)) return argi;
|
||||
if (0 == strcmp("<=",exp_op) && !(predefs[x]->value <= exp_version)) return argi;
|
||||
if (0 == strcmp("==",exp_op) && !(predefs[x]->value == exp_version)) return argi;
|
||||
if (0 == strcmp("!=",exp_op) && !(predefs[x]->value != exp_version)) return argi;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
1
check/predef_check_as_cpp.cpp
Normal file
1
check/predef_check_as_cpp.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include "predef_check_as_c.c"
|
1
check/predef_check_as_objc.m
Normal file
1
check/predef_check_as_objc.m
Normal file
@ -0,0 +1 @@
|
||||
#include "predef_check_as_c.c"
|
1
check/predef_check_as_objcpp.mm
Normal file
1
check/predef_check_as_objcpp.mm
Normal file
@ -0,0 +1 @@
|
||||
#include "predef_check_as_c.c"
|
@ -1,5 +1,5 @@
|
||||
[/
|
||||
Copyright 2014 Rene Rivera
|
||||
Copyright 2014-2015 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,12 +7,22 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
[section History]
|
||||
|
||||
[heading 1.2]
|
||||
|
||||
* Account for skip in Visual Studio product version vs. compiler version.
|
||||
This supports version of VS 2015 an onward.
|
||||
* Add detection of Haiku OS (from Jessica Hamilton).
|
||||
* Some fixes to endian detection for Android (from mstahl-at-redhat.com).
|
||||
* Add missing `BOOST_PREDEF_MAKE_0X_VVRRPP` macro (from Erik Lindahl).
|
||||
* Add `predef_check` program and BBv2 integration for build configuration
|
||||
checks.
|
||||
|
||||
[heading 1.1]
|
||||
|
||||
* Addition of `BOOST_PLAT_*` platform definitions for MinGW and
|
||||
Windows platform variants.
|
||||
* Detection of ARM architecture for Windows compilers to target
|
||||
mobile devices of WIndows 8.
|
||||
mobile devices of Windows 8.
|
||||
* Improved ARM detection for 64 bit ARM.
|
||||
* Added detection of iOS an an operating system.
|
||||
* Improved detection of endianess on some platforms.
|
||||
|
@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Predef 1.1</title>
|
||||
<title>Predef 1.2</title>
|
||||
<link rel="stylesheet" href="boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="index.html" title="Predef 1.1">
|
||||
<link rel="home" href="index.html" title="Predef 1.2">
|
||||
<link rel="next" href="predef/introduction.html" title="Introduction">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@ -13,7 +13,7 @@
|
||||
<div class="titlepage">
|
||||
<div>
|
||||
<div><h2 class="title">
|
||||
<a name="predef"></a>Predef 1.1</h2></div>
|
||||
<a name="predef"></a>Predef 1.2</h2></div>
|
||||
<div><div class="authorgroup"><div class="author"><h3 class="author">
|
||||
<span class="firstname">Rene</span> <span class="surname">Rivera</span>
|
||||
</h3></div></div></div>
|
||||
@ -45,6 +45,7 @@
|
||||
<dt><span class="section"><a href="predef/reference/version_definition_macros.html">Version definition
|
||||
macros</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="predef/check_utilities.html">Check Utilities</a></span></dt>
|
||||
<dt><span class="section"><a href="predef/history.html">History</a></span></dt>
|
||||
<dt><span class="section"><a href="predef/to_do.html">To Do</a></span></dt>
|
||||
<dt><span class="section"><a href="predef/acknoledgements.html">Acknoledgements</a></span></dt>
|
||||
@ -52,7 +53,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"><p><small>Last revised: June 04, 2014 at 03:28:01 GMT</small></p></td>
|
||||
<td align="left"><p><small>Last revised: January 29, 2015 at 21:39:36 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
@ -4,8 +4,8 @@
|
||||
<title>Acknoledgements</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="../index.html" title="Predef 1.1">
|
||||
<link rel="up" href="../index.html" title="Predef 1.1">
|
||||
<link rel="home" href="../index.html" title="Predef 1.2">
|
||||
<link rel="up" href="../index.html" title="Predef 1.2">
|
||||
<link rel="prev" href="to_do.html" title="To Do">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
|
@ -4,8 +4,8 @@
|
||||
<title>Adding new predefs</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="../index.html" title="Predef 1.1">
|
||||
<link rel="up" href="../index.html" title="Predef 1.1">
|
||||
<link rel="home" href="../index.html" title="Predef 1.2">
|
||||
<link rel="up" href="../index.html" title="Predef 1.2">
|
||||
<link rel="prev" href="using_the_predefs.html" title="Using the predefs">
|
||||
<link rel="next" href="reference.html" title="Reference">
|
||||
</head>
|
||||
|
148
doc/html/predef/check_utilities.html
Normal file
148
doc/html/predef/check_utilities.html
Normal file
@ -0,0 +1,148 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Check Utilities</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="../index.html" title="Predef 1.2">
|
||||
<link rel="up" href="../index.html" title="Predef 1.2">
|
||||
<link rel="prev" href="reference/version_definition_macros.html" title="Version definition macros">
|
||||
<link rel="next" href="history.html" title="History">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="reference/version_definition_macros.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="history.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="predef.check_utilities"></a><a class="link" href="check_utilities.html" title="Check Utilities">Check Utilities</a>
|
||||
</h2></div></div></div>
|
||||
<p>
|
||||
The <code class="computeroutput"><span class="identifier">predef_check</span></code> utility provides
|
||||
a facility for building a program that will check a given set of expressions
|
||||
against the definitions it detected when it was built.
|
||||
</p>
|
||||
<h4>
|
||||
<a name="predef.check_utilities.h0"></a>
|
||||
<span class="phrase"><a name="predef.check_utilities.predef_check_programs"></a></span><a class="link" href="check_utilities.html#predef.check_utilities.predef_check_programs"><code class="literal">predef_check</code>
|
||||
programs</a>
|
||||
</h4>
|
||||
<p>
|
||||
Even though there is only one <code class="computeroutput"><span class="identifier">predef_check</span></code>
|
||||
program, there are variations for each of the languages that are detected by
|
||||
Predef to match the convention for sources files. For all of them one invokes
|
||||
with a list of expression arguments. The expressions are evaluated within the
|
||||
context of the particular <code class="literal">predef_check</code> program and if they
|
||||
all are true zero (0) is returned. Otherwise the index of the first false expression
|
||||
is returned.
|
||||
</p>
|
||||
<p>
|
||||
The expression syntax is simple:
|
||||
</p>
|
||||
<pre class="programlisting">predef-definition [ relational-operator version-value ]
|
||||
</pre>
|
||||
<p>
|
||||
<em class="replaceable"><code>predef-definition</code></em> can be any of the Predef definitions.
|
||||
For example <code class="computeroutput"><span class="identifier">BOOST_COMP_GCC</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
<em class="replaceable"><code>relational-operator</code></em> can be any of: <code class="literal">></code>,
|
||||
<code class="literal"><</code>, <code class="literal">>=</code>, <code class="literal"><=</code>,
|
||||
<code class="literal">==</code> and <code class="literal">!=</code>.
|
||||
</p>
|
||||
<p>
|
||||
<em class="replaceable"><code>version-number</code></em> can be a full or partial version
|
||||
triplet value. If it's a partial version triple it is completed with zeros.
|
||||
That is <code class="literal">x.y</code> is equivalent to <code class="literal">x.y.0</code> and
|
||||
<code class="literal">x</code> is equivalent to <code class="literal">x.0.0</code>.
|
||||
</p>
|
||||
<p>
|
||||
The <em class="replaceable"><code>relations-operator</code></em> and <em class="replaceable"><code>version-number</code></em>
|
||||
can be ommited. In which case it is equivalent to:
|
||||
</p>
|
||||
<pre class="programlisting">predef-definition > 0.0.0
|
||||
</pre>
|
||||
<h4>
|
||||
<a name="predef.check_utilities.h1"></a>
|
||||
<span class="phrase"><a name="predef.check_utilities.using_with_boost_build"></a></span><a class="link" href="check_utilities.html#predef.check_utilities.using_with_boost_build">Using
|
||||
with Boost.Build</a>
|
||||
</h4>
|
||||
<p>
|
||||
You can use the <code class="literal">predef_check</code> programs directly from Boost
|
||||
Build to configure target requirements. This is useful for controlling what
|
||||
gets built as part of your project based on the detailed version information
|
||||
available in Predef. The basic use is simple:
|
||||
</p>
|
||||
<pre class="programlisting">import path-to-predef-src/check/predef
|
||||
: check require
|
||||
: predef-check predef-require ;
|
||||
|
||||
exe my_windows_program : windows_source.cpp
|
||||
: [ predef-require "BOOST_OS_WINDOWS" ] ;
|
||||
</pre>
|
||||
<p>
|
||||
That simple use case will skip building the <code class="literal">my_windows_program</code>
|
||||
unless one is building for Windows. Like the direct <code class="literal">predef_check</code>
|
||||
you can pass mutiple expressions using relational comparisons. For example:
|
||||
</p>
|
||||
<pre class="programlisting">import path-to-predef-src/check/predef
|
||||
: check require
|
||||
: predef-check predef-require ;
|
||||
|
||||
lib my_special_lib : source.cpp
|
||||
: [ predef-require "BOOST_OS_WINDOWS != 0" "BOOST_OS_VMS != 0"] ;
|
||||
</pre>
|
||||
<p>
|
||||
And in that case the <code class="literal">my_special_lib</code> is built only when the
|
||||
OS is not Windows or VMS. The <code class="literal">requires</code> rule is a special
|
||||
case of the <code class="literal">check</code> rule. And is defined in terms of it:
|
||||
</p>
|
||||
<pre class="programlisting">rule require ( expressions + : language ? )
|
||||
{
|
||||
return [ check $(expressions) : $(language) : : <build>no ] ;
|
||||
}
|
||||
</pre>
|
||||
<p>
|
||||
You can use the <code class="literal">check</code> rule for more control and to implement
|
||||
something other than control of what gets built. The definition for the <code class="literal">check</code>
|
||||
rule is:
|
||||
</p>
|
||||
<pre class="programlisting">rule check ( expressions + : language ? : true-properties * : false-properties * )
|
||||
</pre>
|
||||
<p>
|
||||
When invoked as a reuirement of a Boost Build target this rule will add the
|
||||
<code class="literal">true-properties</code> to the target if all the <code class="literal">expressions</code>
|
||||
evaluate to true. Otherwise the <code class="literal">false-properties</code> get added
|
||||
as requirements. For example you could use it to enable or disable features
|
||||
in your programs:
|
||||
</p>
|
||||
<pre class="programlisting">import path-to-predef-src/check/predef
|
||||
: check require
|
||||
: predef-check predef-require ;
|
||||
|
||||
exe my_special_exe : source.cpp
|
||||
: [ predef-check "BOOST_OS_WINDOWS == 0"
|
||||
: <define>ENABLE_WMF=0
|
||||
: <define>ENABLE_WMF=1 ] ;
|
||||
</pre>
|
||||
<p>
|
||||
For both <code class="literal">check</code> and <code class="literal">require</code> the <code class="literal">language</code>
|
||||
argument controls which variant of the <code class="literal">predef_check</code> program
|
||||
is used to check the expressions. It defaults to "c++", but can be
|
||||
any of: "c", "cpp", "objc", and "objcpp".
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2005, 2008-2014 Rene Rivera<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>
|
||||
</div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="reference/version_definition_macros.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="history.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -4,14 +4,14 @@
|
||||
<title>History</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="../index.html" title="Predef 1.1">
|
||||
<link rel="up" href="../index.html" title="Predef 1.1">
|
||||
<link rel="prev" href="reference/version_definition_macros.html" title="Version definition macros">
|
||||
<link rel="home" href="../index.html" title="Predef 1.2">
|
||||
<link rel="up" href="../index.html" title="Predef 1.2">
|
||||
<link rel="prev" href="check_utilities.html" title="Check Utilities">
|
||||
<link rel="next" href="to_do.html" title="To Do">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="reference/version_definition_macros.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="to_do.html"><img src="../images/next.png" alt="Next"></a>
|
||||
<a accesskey="p" href="check_utilities.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="to_do.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
@ -19,6 +19,30 @@
|
||||
</h2></div></div></div>
|
||||
<h4>
|
||||
<a name="predef.history.h0"></a>
|
||||
<span class="phrase"><a name="predef.history.1_2"></a></span><a class="link" href="history.html#predef.history.1_2">1.2</a>
|
||||
</h4>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||||
<li class="listitem">
|
||||
Account for skip in Visual Studio product version vs. compiler version.
|
||||
This supports version of VS 2015 an onward.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Add detection of Haiku OS (from Jessica Hamilton).
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Some fixes to endian detection for Android (from mstahl-at-redhat.com).
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Add missing <code class="computeroutput"><span class="identifier">BOOST_PREDEF_MAKE_0X_VVRRPP</span></code>
|
||||
macro (from Erik Lindahl).
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Add <code class="computeroutput"><span class="identifier">predef_check</span></code> program
|
||||
and BBv2 integration for build configuration checks.
|
||||
</li>
|
||||
</ul></div>
|
||||
<h4>
|
||||
<a name="predef.history.h1"></a>
|
||||
<span class="phrase"><a name="predef.history.1_1"></a></span><a class="link" href="history.html#predef.history.1_1">1.1</a>
|
||||
</h4>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||||
@ -28,7 +52,7 @@
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Detection of ARM architecture for Windows compilers to target mobile devices
|
||||
of WIndows 8.
|
||||
of Windows 8.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Improved ARM detection for 64 bit ARM.
|
||||
@ -68,7 +92,7 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="reference/version_definition_macros.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="to_do.html"><img src="../images/next.png" alt="Next"></a>
|
||||
<a accesskey="p" href="check_utilities.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="to_do.html"><img src="../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -4,9 +4,9 @@
|
||||
<title>Introduction</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="../index.html" title="Predef 1.1">
|
||||
<link rel="up" href="../index.html" title="Predef 1.1">
|
||||
<link rel="prev" href="../index.html" title="Predef 1.1">
|
||||
<link rel="home" href="../index.html" title="Predef 1.2">
|
||||
<link rel="up" href="../index.html" title="Predef 1.2">
|
||||
<link rel="prev" href="../index.html" title="Predef 1.2">
|
||||
<link rel="next" href="using_the_predefs.html" title="Using the predefs">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
|
@ -4,8 +4,8 @@
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="../index.html" title="Predef 1.1">
|
||||
<link rel="up" href="../index.html" title="Predef 1.1">
|
||||
<link rel="home" href="../index.html" title="Predef 1.2">
|
||||
<link rel="up" href="../index.html" title="Predef 1.2">
|
||||
<link rel="prev" href="adding_new_predefs.html" title="Adding new predefs">
|
||||
<link rel="next" href="reference/boost_arch_architecture_macros.html" title="BOOST_ARCH architecture macros">
|
||||
</head>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>BOOST_ARCH architecture macros</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="../../index.html" title="Predef 1.1">
|
||||
<link rel="home" href="../../index.html" title="Predef 1.2">
|
||||
<link rel="up" href="../reference.html" title="Reference">
|
||||
<link rel="prev" href="../reference.html" title="Reference">
|
||||
<link rel="next" href="boost_comp_compiler_macros.html" title="BOOST_COMP compiler macros">
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>BOOST_COMP compiler macros</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="../../index.html" title="Predef 1.1">
|
||||
<link rel="home" href="../../index.html" title="Predef 1.2">
|
||||
<link rel="up" href="../reference.html" title="Reference">
|
||||
<link rel="prev" href="boost_arch_architecture_macros.html" title="BOOST_ARCH architecture macros">
|
||||
<link rel="next" href="boost_lang_language_standards_ma.html" title="BOOST_LANG language standards macros">
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>BOOST_LANG language standards macros</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="../../index.html" title="Predef 1.1">
|
||||
<link rel="home" href="../../index.html" title="Predef 1.2">
|
||||
<link rel="up" href="../reference.html" title="Reference">
|
||||
<link rel="prev" href="boost_comp_compiler_macros.html" title="BOOST_COMP compiler macros">
|
||||
<link rel="next" href="boost_lib_library_macros.html" title="BOOST_LIB library macros">
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>BOOST_LIB library macros</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="../../index.html" title="Predef 1.1">
|
||||
<link rel="home" href="../../index.html" title="Predef 1.2">
|
||||
<link rel="up" href="../reference.html" title="Reference">
|
||||
<link rel="prev" href="boost_lang_language_standards_ma.html" title="BOOST_LANG language standards macros">
|
||||
<link rel="next" href="boost_os_operating_system_macros.html" title="BOOST_OS operating system macros">
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>BOOST_OS operating system macros</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="../../index.html" title="Predef 1.1">
|
||||
<link rel="home" href="../../index.html" title="Predef 1.2">
|
||||
<link rel="up" href="../reference.html" title="Reference">
|
||||
<link rel="prev" href="boost_lib_library_macros.html" title="BOOST_LIB library macros">
|
||||
<link rel="next" href="boost_plat_platform_macros.html" title="BOOST_PLAT platform macros">
|
||||
@ -417,6 +417,44 @@
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h6"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_haiku"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_haiku"><code class="computeroutput"><span class="identifier">BOOST_OS_HAIKU</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
<a href="http://en.wikipedia.org/wiki/Haiku_(operating_system)" target="_top">Haiku</a>
|
||||
operating system.
|
||||
</p>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>
|
||||
<p>
|
||||
Symbol
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
Version
|
||||
</p>
|
||||
</th>
|
||||
</tr></thead>
|
||||
<tbody><tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">__HAIKU__</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<span class="bold"><strong>detection</strong></span>
|
||||
</p>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h7"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_hpux"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_hpux"><code class="computeroutput"><span class="identifier">BOOST_OS_HPUX</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -479,7 +517,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h7"></a>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h8"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_ios"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_ios"><code class="computeroutput"><span class="identifier">BOOST_OS_IOS</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -554,7 +592,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h8"></a>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h9"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_irix"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_irix"><code class="computeroutput"><span class="identifier">BOOST_OS_IRIX</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -605,7 +643,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h9"></a>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h10"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_linux"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_linux"><code class="computeroutput"><span class="identifier">BOOST_OS_LINUX</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -656,7 +694,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h10"></a>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h11"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_macos"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_macos"><code class="computeroutput"><span class="identifier">BOOST_OS_MACOS</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -756,7 +794,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h11"></a>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h12"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_os400"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_os400"><code class="computeroutput"><span class="identifier">BOOST_OS_OS400</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -794,7 +832,7 @@
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h12"></a>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h13"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_qnx"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_qnx"><code class="computeroutput"><span class="identifier">BOOST_OS_QNX</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -871,7 +909,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h13"></a>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h14"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_solaris"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_solaris"><code class="computeroutput"><span class="identifier">BOOST_OS_SOLARIS</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -923,7 +961,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h14"></a>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h15"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_unix"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_unix"><code class="computeroutput"><span class="identifier">BOOST_OS_UNIX</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -999,7 +1037,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h15"></a>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h16"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_svr4"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_svr4"><code class="computeroutput"><span class="identifier">BOOST_OS_SVR4</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -1075,7 +1113,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h16"></a>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h17"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_vms"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_vms"><code class="computeroutput"><span class="identifier">BOOST_OS_VMS</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -1138,7 +1176,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h17"></a>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h18"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_windows"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_windows"><code class="computeroutput"><span class="identifier">BOOST_OS_WINDOWS</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -1226,7 +1264,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h18"></a>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h19"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_bsd_bsdi"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_bsd_bsdi"><code class="computeroutput"><span class="identifier">BOOST_OS_BSD_BSDI</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -1264,7 +1302,7 @@
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h19"></a>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h20"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_bsd_dragonfly"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_bsd_dragonfly"><code class="computeroutput"><span class="identifier">BOOST_OS_BSD_DRAGONFLY</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -1302,7 +1340,7 @@
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h20"></a>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h21"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_bsd_free"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_bsd_free"><code class="computeroutput"><span class="identifier">BOOST_OS_BSD_FREE</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -1354,7 +1392,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h21"></a>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h22"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_bsd_net"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_bsd_net"><code class="computeroutput"><span class="identifier">BOOST_OS_BSD_NET</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -1466,7 +1504,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<h5>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h22"></a>
|
||||
<a name="predef.reference.boost_os_operating_system_macros.h23"></a>
|
||||
<span class="phrase"><a name="predef.reference.boost_os_operating_system_macros.boost_os_bsd_open"></a></span><a class="link" href="boost_os_operating_system_macros.html#predef.reference.boost_os_operating_system_macros.boost_os_bsd_open"><code class="computeroutput"><span class="identifier">BOOST_OS_BSD_OPEN</span></code></a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>BOOST_PLAT platform macros</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="../../index.html" title="Predef 1.1">
|
||||
<link rel="home" href="../../index.html" title="Predef 1.2">
|
||||
<link rel="up" href="../reference.html" title="Reference">
|
||||
<link rel="prev" href="boost_os_operating_system_macros.html" title="BOOST_OS operating system macros">
|
||||
<link rel="next" href="other_macros.html" title="Other macros">
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Other macros</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="../../index.html" title="Predef 1.1">
|
||||
<link rel="home" href="../../index.html" title="Predef 1.2">
|
||||
<link rel="up" href="../reference.html" title="Reference">
|
||||
<link rel="prev" href="boost_plat_platform_macros.html" title="BOOST_PLAT platform macros">
|
||||
<link rel="next" href="version_definition_macros.html" title="Version definition macros">
|
||||
|
@ -4,14 +4,14 @@
|
||||
<title>Version definition macros</title>
|
||||
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="../../index.html" title="Predef 1.1">
|
||||
<link rel="home" href="../../index.html" title="Predef 1.2">
|
||||
<link rel="up" href="../reference.html" title="Reference">
|
||||
<link rel="prev" href="other_macros.html" title="Other macros">
|
||||
<link rel="next" href="../history.html" title="History">
|
||||
<link rel="next" href="../check_utilities.html" title="Check Utilities">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="other_macros.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../history.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
<a accesskey="p" href="other_macros.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../check_utilities.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
@ -105,6 +105,9 @@
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">BOOST_PREDEF_MAKE_0X_VRRPP000</span><span class="special">(</span><span class="identifier">V</span><span class="special">)</span></code>
|
||||
</p>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">BOOST_PREDEF_MAKE_0X_VVRRPP</span><span class="special">(</span><span class="identifier">V</span><span class="special">)</span></code>
|
||||
</p>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">BOOST_PREDEF_MAKE_10_VPPP</span><span class="special">(</span><span class="identifier">V</span><span class="special">)</span></code>
|
||||
</p>
|
||||
@ -178,7 +181,7 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="other_macros.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../history.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
<a accesskey="p" href="other_macros.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../check_utilities.html"><img src="../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -4,8 +4,8 @@
|
||||
<title>To Do</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="../index.html" title="Predef 1.1">
|
||||
<link rel="up" href="../index.html" title="Predef 1.1">
|
||||
<link rel="home" href="../index.html" title="Predef 1.2">
|
||||
<link rel="up" href="../index.html" title="Predef 1.2">
|
||||
<link rel="prev" href="history.html" title="History">
|
||||
<link rel="next" href="acknoledgements.html" title="Acknoledgements">
|
||||
</head>
|
||||
@ -17,9 +17,14 @@
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="predef.to_do"></a><a class="link" href="to_do.html" title="To Do">To Do</a>
|
||||
</h2></div></div></div>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||||
<li class="listitem">
|
||||
Improve reference documentation.
|
||||
</li></ul></div>
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Provide BOOST_WORKAROUND style macros for public use.
|
||||
</li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
|
@ -4,8 +4,8 @@
|
||||
<title>Using the predefs</title>
|
||||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<link rel="home" href="../index.html" title="Predef 1.1">
|
||||
<link rel="up" href="../index.html" title="Predef 1.1">
|
||||
<link rel="home" href="../index.html" title="Predef 1.2">
|
||||
<link rel="up" href="../index.html" title="Predef 1.2">
|
||||
<link rel="prev" href="introduction.html" title="Introduction">
|
||||
<link rel="next" href="adding_new_predefs.html" title="Adding new predefs">
|
||||
</head>
|
||||
|
129
doc/predef.qbk
129
doc/predef.qbk
@ -1,6 +1,6 @@
|
||||
[article Predef
|
||||
[quickbook 1.7]
|
||||
[version 1.1]
|
||||
[version 1.2]
|
||||
[authors [Rivera, Rene]]
|
||||
[copyright 2005, 2008-2014 Rene Rivera]
|
||||
[purpose Identification and specification of predefined macros.]
|
||||
@ -558,6 +558,133 @@ and "Y", "M", "D" for dates.
|
||||
|
||||
[endsect]
|
||||
|
||||
[section Check Utilities]
|
||||
|
||||
The `predef_check` utility provides a facility for building a
|
||||
program that will check a given set of expressions against
|
||||
the definitions it detected when it was built.
|
||||
|
||||
[heading [^predef_check] programs]
|
||||
|
||||
Even though there is only one `predef_check` program, there
|
||||
are variations for each of the languages that are detected
|
||||
by Predef to match the convention for sources files. For all
|
||||
of them one invokes with a list of expression arguments. The
|
||||
expressions are evaluated within the context of the particular
|
||||
[^predef_check] program and if they all are true zero (0) is returned.
|
||||
Otherwise the index of the first false expression is returned.
|
||||
|
||||
The expression syntax is simple:
|
||||
|
||||
[teletype]
|
||||
``
|
||||
predef-definition [ relational-operator version-value ]
|
||||
``
|
||||
[c++]
|
||||
|
||||
[~predef-definition] can be any of the Predef definitions. For
|
||||
example `BOOST_COMP_GCC`.
|
||||
|
||||
[~relational-operator] can be any of: [^>], [^<], [^>=], [^<=],
|
||||
[^==] and [^!=].
|
||||
|
||||
[~version-number] can be a full or partial version triplet value.
|
||||
If it's a partial version triple it is completed with zeros. That
|
||||
is [^x.y] is equivalent to [^x.y.0] and [^x] is equivalent to
|
||||
[^x.0.0].
|
||||
|
||||
The [~relations-operator] and [~version-number] can be ommited. In
|
||||
which case it is equivalent to:
|
||||
|
||||
[teletype]
|
||||
``
|
||||
predef-definition > 0.0.0
|
||||
``
|
||||
[c++]
|
||||
|
||||
[heading Using with Boost.Build]
|
||||
|
||||
You can use the [^predef_check] programs directly from Boost Build
|
||||
to configure target requirements. This is useful for controlling
|
||||
what gets built as part of your project based on the detailed
|
||||
version information available in Predef. The basic use is simple:
|
||||
|
||||
[teletype]
|
||||
``
|
||||
import path-to-predef-src/check/predef
|
||||
: check require
|
||||
: predef-check predef-require ;
|
||||
|
||||
exe my_windows_program : windows_source.cpp
|
||||
: [ predef-require "BOOST_OS_WINDOWS" ] ;
|
||||
``
|
||||
[c++]
|
||||
|
||||
That simple use case will skip building the [^my_windows_program]
|
||||
unless one is building for Windows. Like the direct [^predef_check]
|
||||
you can pass mutiple expressions using relational comparisons.
|
||||
For example:
|
||||
|
||||
[teletype]
|
||||
``
|
||||
import path-to-predef-src/check/predef
|
||||
: check require
|
||||
: predef-check predef-require ;
|
||||
|
||||
lib my_special_lib : source.cpp
|
||||
: [ predef-require "BOOST_OS_WINDOWS != 0" "BOOST_OS_VMS != 0"] ;
|
||||
``
|
||||
[c++]
|
||||
|
||||
And in that case the [^my_special_lib] is built only when the OS is
|
||||
not Windows or VMS. The [^requires] rule is a special case of the
|
||||
[^check] rule. And is defined in terms of it:
|
||||
|
||||
[teletype]
|
||||
``
|
||||
rule require ( expressions + : language ? )
|
||||
{
|
||||
return [ check $(expressions) : $(language) : : <build>no ] ;
|
||||
}
|
||||
``
|
||||
[c++]
|
||||
|
||||
You can use the [^check] rule for more control and to implement
|
||||
something other than control of what gets built. The definition
|
||||
for the [^check] rule is:
|
||||
|
||||
[teletype]
|
||||
``
|
||||
rule check ( expressions + : language ? : true-properties * : false-properties * )
|
||||
``
|
||||
[c++]
|
||||
|
||||
When invoked as a reuirement of a Boost Build target this rule
|
||||
will add the [^true-properties] to the target if all the [^expressions]
|
||||
evaluate to true. Otherwise the [^false-properties] get added as
|
||||
requirements. For example you could use it to enable or disable
|
||||
features in your programs:
|
||||
|
||||
[teletype]
|
||||
``
|
||||
import path-to-predef-src/check/predef
|
||||
: check require
|
||||
: predef-check predef-require ;
|
||||
|
||||
exe my_special_exe : source.cpp
|
||||
: [ predef-check "BOOST_OS_WINDOWS == 0"
|
||||
: <define>ENABLE_WMF=0
|
||||
: <define>ENABLE_WMF=1 ] ;
|
||||
``
|
||||
[c++]
|
||||
|
||||
For both [^check] and [^require] the [^language] argument controls
|
||||
which variant of the [^predef_check] program is used to check the
|
||||
expressions. It defaults to "c++", but can be any of: "c", "cpp",
|
||||
"objc", and "objcpp".
|
||||
|
||||
[endsect]
|
||||
|
||||
[include history.qbk]
|
||||
[include todo.qbk]
|
||||
|
||||
|
@ -8,5 +8,6 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
[section To Do]
|
||||
|
||||
* Improve reference documentation.
|
||||
* Provide BOOST_WORKAROUND style macros for public use.
|
||||
|
||||
[endsect]
|
||||
|
@ -42,6 +42,8 @@ Macros are:
|
||||
#define BOOST_PREDEF_MAKE_0X_VVRRP(V) BOOST_VERSION_NUMBER((V&0xFF000)>>12,(V&0xFF0)>>4,(V&0xF))
|
||||
/*` `BOOST_PREDEF_MAKE_0X_VRRPP000(V)` */
|
||||
#define BOOST_PREDEF_MAKE_0X_VRRPP000(V) BOOST_VERSION_NUMBER((V&0xF0000000)>>28,(V&0xFF00000)>>20,(V&0xFF000)>>12)
|
||||
/*` `BOOST_PREDEF_MAKE_0X_VVRRPP(V)` */
|
||||
#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_VRP(V)` */
|
||||
|
@ -15,6 +15,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#include <boost/predef/os/beos.h>
|
||||
#include <boost/predef/os/bsd.h>
|
||||
#include <boost/predef/os/cygwin.h>
|
||||
#include <boost/predef/os/haiku.h>
|
||||
#include <boost/predef/os/hpux.h>
|
||||
#include <boost/predef/os/irix.h>
|
||||
#include <boost/predef/os/ios.h>
|
||||
|
47
include/boost/predef/os/haiku.h
Normal file
47
include/boost/predef/os/haiku.h
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
Copyright Jessica Hamilton 2014
|
||||
Copyright Rene Rivera 2014
|
||||
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_OS_HAIKU_H
|
||||
#define BOOST_PREDEF_OS_HAIKU_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_OS_HAIKU`]
|
||||
|
||||
[@http://en.wikipedia.org/wiki/Haiku_(operating_system) Haiku] operating system.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__HAIKU__`] [__predef_detection__]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_OS_HAIKU BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
|
||||
defined(__HAIKU__) \
|
||||
)
|
||||
# undef BOOST_OS_HAIKU
|
||||
# define BOOST_OS_HAIKU BOOST_VERSION_NUMBER_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if BOOST_OS_HAIKU
|
||||
# define BOOST_OS_HAIKU_AVAILABLE
|
||||
# include <boost/predef/detail/os_detected.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_OS_HAIKU_NAME "Haiku"
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_OS_HAIKU,BOOST_OS_HAIKU_NAME)
|
||||
|
||||
|
||||
#endif
|
@ -13,6 +13,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#include <boost/predef/library/c/gnu.h>
|
||||
#include <boost/predef/os/macos.h>
|
||||
#include <boost/predef/os/bsd.h>
|
||||
#include <boost/predef/os/android.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_ENDIAN_*`]
|
||||
@ -53,7 +54,7 @@ information and acquired knowledge:
|
||||
*/
|
||||
#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \
|
||||
!BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD
|
||||
# if BOOST_LIB_C_GNU
|
||||
# if BOOST_LIB_C_GNU || BOOST_OS_ANDROID
|
||||
# include <endian.h>
|
||||
# else
|
||||
# if BOOST_OS_MACOS
|
||||
@ -69,29 +70,29 @@ information and acquired knowledge:
|
||||
# endif
|
||||
# endif
|
||||
# if defined(__BYTE_ORDER)
|
||||
# if (__BYTE_ORDER == __BIG_ENDIAN)
|
||||
# if defined(__BIG_ENDIAN) && (__BYTE_ORDER == __BIG_ENDIAN)
|
||||
# undef BOOST_ENDIAN_BIG_BYTE
|
||||
# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
# if (__BYTE_ORDER == __LITTLE_ENDIAN)
|
||||
# if defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == __LITTLE_ENDIAN)
|
||||
# undef BOOST_ENDIAN_LITTLE_BYTE
|
||||
# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
# if (__BYTE_ORDER == __PDP_ENDIAN)
|
||||
# if defined(__PDP_ENDIAN) && (__BYTE_ORDER == __PDP_ENDIAN)
|
||||
# undef BOOST_ENDIAN_LITTLE_WORD
|
||||
# define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
# endif
|
||||
# if !defined(__BYTE_ORDER) && defined(_BYTE_ORDER)
|
||||
# if (_BYTE_ORDER == _BIG_ENDIAN)
|
||||
# if defined(_BIG_ENDIAN) && (_BYTE_ORDER == _BIG_ENDIAN)
|
||||
# undef BOOST_ENDIAN_BIG_BYTE
|
||||
# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
# if (_BYTE_ORDER == _LITTLE_ENDIAN)
|
||||
# if defined(_LITTLE_ENDIAN) && (_BYTE_ORDER == _LITTLE_ENDIAN)
|
||||
# undef BOOST_ENDIAN_LITTLE_BYTE
|
||||
# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
# if (_BYTE_ORDER == _PDP_ENDIAN)
|
||||
# if defined(_PDP_ENDIAN) && (_BYTE_ORDER == _PDP_ENDIAN)
|
||||
# undef BOOST_ENDIAN_LITTLE_WORD
|
||||
# define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
|
@ -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,1,0)
|
||||
#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,2,0)
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,8 @@
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
import ../check/predef : require : predef-require ;
|
||||
|
||||
local predef-include-root ;
|
||||
local predef-dependency ;
|
||||
|
||||
@ -53,6 +55,6 @@ test-suite predef :
|
||||
[ run info_as_objc.m : : : <test-info>always_show_run_output ]
|
||||
[ run version.cpp ]
|
||||
[ run make.cpp ]
|
||||
[ compile macos_endian.c ]
|
||||
[ compile macos_vs_bsd.c ]
|
||||
[ compile macos_endian.c : [ predef-require "BOOST_OS_MACOS" : cpp ] ]
|
||||
[ compile macos_vs_bsd.c : [ predef-require "BOOST_OS_MACOS" : cpp ] ]
|
||||
;
|
||||
|
@ -13,8 +13,8 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
typedef struct predef_info
|
||||
{
|
||||
unsigned tag;
|
||||
char * name;
|
||||
char * description;
|
||||
const char * name;
|
||||
const char * description;
|
||||
unsigned value;
|
||||
} predef_info;
|
||||
|
||||
@ -46,7 +46,7 @@ int main()
|
||||
if (*i == 0x67890DEF)
|
||||
{
|
||||
predef_count += 1;
|
||||
predefs = realloc(predefs,predef_count*sizeof(predef_info*));
|
||||
predefs = (predef_info**)realloc(predefs,predef_count*sizeof(predef_info*));
|
||||
predefs[predef_count-1] = (predef_info*)i;
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ void test_BOOST_VERSION_NUMBER()
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VRRPPPP(0xFFFFFFF) == BOOST_VERSION_NUMBER(0xF,0xFF,0xFFFF));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VVRRP(0xFFFFF) == BOOST_VERSION_NUMBER(0xFF,0xFF,0xF));
|
||||
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_VRP(999) == BOOST_VERSION_NUMBER(9,9,9));
|
||||
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VPPP(9999) == BOOST_VERSION_NUMBER(9,0,999));
|
||||
|
Reference in New Issue
Block a user