Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Alias

The alias rule gives an alternative name to a group of targets. For example, to give the name core to a group of three other targets with the following code:

alias core : im reader writer ;

Using core on the command line, or in the source list of any other target is the same as explicitly using im , reader, and writer.

Another use of the alias rule is to change build properties. For example, if you want to use link statically to the Boost Threads library, you can write the following:

alias threads : /boost/thread//boost_thread : <link>static ;

and use only the threads alias in your Jamfiles.

You can also specify usage requirements for the alias target. If you write the following:

alias header_only_library : : : :  <include>/usr/include/header_only_library ;

then using header_only_library in sources will only add an include path. Also note that when an alias has sources, their usage requirements are propagated as well. For example:

lib library1 : library1.cpp : : : <include>/library/include1 ;
lib library2 : library2.cpp : : : <include>/library/include2 ;
alias static_libraries : library1 library2 : <link>static ;
exe main : main.cpp static_libraries ;

will compile main.cpp with additional includes required for using the specified static libraries.

PrevUpHomeNext