Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>(I think some stuff is missing from your jam rules, possibly due to formatting.)</p> <p>Yes, you definitely can define both the debug and production targets with the same rule, using <a href="http://www.boost.org/doc/tools/build/doc/html/bbv2/tutorial/conditions.html" rel="nofollow noreferrer">conditional requirements</a>. An example is even <a href="http://www.boost.org/doc/tools/build/doc/html/bbv2/tasks/installing.html" rel="nofollow noreferrer">the documentation of the <code>install</code> rule</a>.</p> <p>I believe your original rules look like</p> <pre><code>install libCDef : CDef : &lt;install-type&gt;LIB &lt;location&gt;"/home/morpheus/base_install/lib" : &lt;variant&gt;release ; install _libCDef_D : CDef : &lt;install-type&gt;LIB &lt;location&gt;"/home/morpheus/base_install/libdebug" : &lt;variant&gt;debug ; </code></pre> <p>You'll want to make the <code>location</code> feature dependendent on the variant, like so:</p> <pre><code>install libCDef : CDef : &lt;install-type&gt;LIB &lt;variant&gt;release:&lt;location&gt;"/home/morpheus/base_install/lib" &lt;variant&gt;debug:&lt;location&gt;"/home/morpheus/base_install/libdebug" ; </code></pre> <p>As for the second question, yes, <code>use-project</code> would help, although it shouldn't be necessary. You want to do this</p> <pre><code>exe callFSLR : call_FSLR.cpp ../base/CDef//CDef ; </code></pre> <p><code>../base/CDef//CDef</code> refers to the target named <code>CDef</code> defined in the project (directory) <code>../base/CDef</code>. This refers to the library rule, so boost build will use the version of the library in the bin directory, not the version created by the install rule. (This might matter if you have dynamic library issues.) Also, you don't need the <code>lib CDef</code> immediately above this rule.</p> <p>To avoid the clumsiness of the <code>../base/CDef</code>, you could use the <code>use-project</code> rule to make a new definition for the project. Then should you reorganize the directory structure, you only have one place to change it.</p> <pre><code>use-project /CDef-project : ../base/CDef ; exe callFSLR : call_FSLR.cpp /CDef-project//CDef ; </code></pre> <p>Another possibility, if you are going to use the one target in this one Jamfile, is to use the alias rule.</p> <pre><code>alias CDef : ../base/CDef//CDef ; exe callFSLR : call_FSLR.cpp CDef ; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload