mirror of
https://github.com/boostorg/units.git
synced 2026-01-20 17:12:16 +00:00
* Make the library modular usable. * Switch to library requirements instead of source. As source puts extra source in install targets. * Add requires-b2 check to top-level build file. * Update dependencies. * Bump B2 require to 5.2 * Update copyright dates. * Move inter-lib dependencies to a project variable and into the build targets. * Adjust doc build to avoid boost-root references. * Update build deps. * Change math dep real target math/tr1. * Move include to target.
60 lines
1.6 KiB
Plaintext
60 lines
1.6 KiB
Plaintext
# Jamfile.v2
|
|
#
|
|
# Copyright (c) 2007-2008
|
|
# Steven Watanabe
|
|
#
|
|
# 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
|
|
|
|
import testing ;
|
|
import path ;
|
|
import regex ;
|
|
import print ;
|
|
import sequence ;
|
|
import feature ;
|
|
|
|
project : requirements <library>/boost/units//boost_units ;
|
|
|
|
path-constant INCLUDE_DIR : ../include ;
|
|
headers = [ path.glob-tree $(INCLUDE_DIR)/boost/units : *.hpp : detail ] ;
|
|
|
|
for local file in $(headers)
|
|
{
|
|
compile test.cpp
|
|
: # requirements
|
|
<define>BOOST_UNITS_HEADER_NAME=$(file)
|
|
<dependency>$(file)
|
|
: # test name
|
|
[ regex.replace [ path.relative-to $(INCLUDE_DIR) $(file) ] "/" "_" ] ;
|
|
}
|
|
|
|
feature.feature <generate-include-all-order> : forward reverse : incidental ;
|
|
|
|
rule generate-include-all ( target : sources * : properties * )
|
|
{
|
|
print.output $(target) ;
|
|
|
|
if <generate-include-all-order>reverse in $(properties)
|
|
{
|
|
sources = [ sequence.reverse $(sources) ] ;
|
|
}
|
|
|
|
for local file in $(sources)
|
|
{
|
|
if $(file:S) = ".hpp"
|
|
{
|
|
local f = [ path.relative-to $(INCLUDE_DIR) $(file:G=) ] ;
|
|
print.text "#include <$(f)>
|
|
" : overwrite ;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
make include_all1.cpp : $(headers) : @generate-include-all ;
|
|
make include_all2.cpp : $(headers) : @generate-include-all : <generate-include-all-order>reverse ;
|
|
|
|
# this ought to catch non-inlined functions and other duplicate definitions
|
|
link include_all1.cpp include_all2.cpp main.cpp : <include>. : include_all_headers ;
|