1 | <html> |
---|
2 | <head> |
---|
3 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
---|
4 | <title> |
---|
5 | How to control properties order? |
---|
6 | </title> |
---|
7 | <link rel="stylesheet" href="../../boostbook.css" type="text/css"> |
---|
8 | <meta name="generator" content="DocBook XSL Stylesheets V1.69.1"> |
---|
9 | <style type="text/css"> |
---|
10 | body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png'); |
---|
11 | background-repeat: no-repeat; |
---|
12 | background-position: top left; |
---|
13 | /* The following properties make the watermark "fixed" on the page. */ |
---|
14 | /* I think that's just a bit too distracting for the reader... */ |
---|
15 | /* background-attachment: fixed; */ |
---|
16 | /* background-position: center center; */ |
---|
17 | }</style> |
---|
18 | <link rel="start" href="../../index.html" title="The Boost C++ Libraries"> |
---|
19 | <link rel="up" href="../faq.html" title="Chapter 27. Frequently Asked Questions"> |
---|
20 | <link rel="prev" href="envar.html" title=" |
---|
21 | Accessing environment variables |
---|
22 | "> |
---|
23 | <link rel="next" href="s04.html" title=" |
---|
24 | How to control the library order on Unix? |
---|
25 | "> |
---|
26 | </head> |
---|
27 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
---|
28 | <table cellpadding="2" width="100%"> |
---|
29 | <td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td> |
---|
30 | <td align="center"><a href="../../../../index.htm">Home</a></td> |
---|
31 | <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> |
---|
32 | <td align="center"><a href="../../../../people/people.htm">People</a></td> |
---|
33 | <td align="center"><a href="../../../../more/faq.htm">FAQ</a></td> |
---|
34 | <td align="center"><a href="../../../../more/index.htm">More</a></td> |
---|
35 | </table> |
---|
36 | <hr> |
---|
37 | <div class="spirit-nav"> |
---|
38 | <a accesskey="p" href="envar.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../faq.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="s04.html"><img src="../../images/next.png" alt="Next"></a> |
---|
39 | </div> |
---|
40 | <div class="section" lang="en"> |
---|
41 | <div class="titlepage"><div><div><h2 class="title" style="clear: both"> |
---|
42 | <a name="id2861716"></a> |
---|
43 | How to control properties order? |
---|
44 | </h2></div></div></div> |
---|
45 | <p>For internal reasons, Boost.Build sorts all the properties |
---|
46 | alphabetically. This means that if you write: |
---|
47 | </p> |
---|
48 | <pre class="programlisting"> |
---|
49 | exe a : a.cpp : <include>b <include>a ; |
---|
50 | </pre> |
---|
51 | <p> |
---|
52 | then the command line with first mention the "a" include directory, and |
---|
53 | then "b", even though they are specified in the opposite order. In most |
---|
54 | cases, the user doesn't care. But sometimes the order of includes, or |
---|
55 | other properties, is important. For example, if one uses both the C++ |
---|
56 | Boost library and the "boost-sandbox" (libraries in development), then |
---|
57 | include path for boost-sandbox must come first, because some headers may |
---|
58 | override ones in C++ Boost. For such cases, a special syntax is |
---|
59 | provided: |
---|
60 | </p> |
---|
61 | <pre class="programlisting"> |
---|
62 | exe a : a.cpp : <include>a&&b ; |
---|
63 | </pre> |
---|
64 | <p>The <code class="computeroutput">&&</code> symbols separate values of an |
---|
65 | property, and specify that the order of the values should be preserved. You |
---|
66 | are advised to use this feature only when the order of properties really |
---|
67 | matters, and not as a convenient shortcut. Using it everywhere might |
---|
68 | negatively affect performance. |
---|
69 | </p> |
---|
70 | </div> |
---|
71 | <table width="100%"><tr> |
---|
72 | <td align="left"></td> |
---|
73 | <td align="right"><small></small></td> |
---|
74 | </tr></table> |
---|
75 | <hr> |
---|
76 | <div class="spirit-nav"> |
---|
77 | <a accesskey="p" href="envar.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../faq.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="s04.html"><img src="../../images/next.png" alt="Next"></a> |
---|
78 | </div> |
---|
79 | </body> |
---|
80 | </html> |
---|