mirror of
https://github.com/boostorg/build.git
synced 2026-02-13 12:22:17 +00:00
Merge remote-tracking branch 'upstream/develop' into develop
# Conflicts: # src/tools/gcc.jam
This commit is contained in:
17
.travis.yml
17
.travis.yml
@@ -11,21 +11,18 @@ matrix:
|
||||
include:
|
||||
- os: linux
|
||||
dist: trusty
|
||||
env: TOOLSET=gcc TEST_ALL_EXTRAS=
|
||||
env: TOOLSET=gcc
|
||||
- os: linux
|
||||
dist: trusty
|
||||
env: TOOLSET=clang TEST_ALL_EXTRAS=
|
||||
env: TOOLSET=clang
|
||||
- os: osx
|
||||
osx_image: xcode8.3
|
||||
env: TOOLSET=clang TEST_ALL_EXTRAS=
|
||||
allow_failures:
|
||||
- os: osx
|
||||
osx_image: xcode8.3
|
||||
env: TOOLSET=clang TEST_ALL_EXTRAS=
|
||||
env: TOOLSET=clang
|
||||
language: cpp
|
||||
script:
|
||||
- cd src/engine
|
||||
- ./build.sh
|
||||
- cd ../..
|
||||
- ./bootstrap.sh --with-toolset=${TOOLSET}
|
||||
- cd test
|
||||
- DO_DIFF=diff python test_all.py ${TOOLSET} ${TEST_ALL_EXTRAS}
|
||||
- DO_DIFF=diff python library_chain.py --verbose ${TOOLSET} ${TEST_ALL_EXTRAS}
|
||||
- DO_DIFF=diff python searched_lib.py --verbose ${TOOLSET} ${TEST_ALL_EXTRAS}
|
||||
- python test_all.py ${TOOLSET}
|
||||
|
||||
@@ -22,5 +22,4 @@ build_script:
|
||||
|
||||
test_script:
|
||||
- cd test
|
||||
- set DO_DIFF=1
|
||||
- python test_all.py msvc %TEST_ALL_EXTRAS% --preserve
|
||||
- python test_all.py msvc
|
||||
|
||||
@@ -37,7 +37,7 @@ feature.feature configure : : composite optional ;
|
||||
# relevant features are also considered relevant.
|
||||
#
|
||||
feature.compose <configure> :
|
||||
<target-os> <toolset> <address-model> <architecture> ;
|
||||
<target-os> <toolset> <address-model> <architecture> <cxxstd> ;
|
||||
|
||||
|
||||
rule log-summary ( )
|
||||
|
||||
@@ -794,7 +794,9 @@ class action
|
||||
# rules.
|
||||
.action on $(actual-targets) = $(__name__) ;
|
||||
|
||||
indirect.call $(self.action-name) $(actual-targets)
|
||||
#indirect.call $(self.action-name) $(actual-targets)
|
||||
# : $(self.actual-sources) : [ $(properties).raw ] ;
|
||||
execute $(self.action-name) $(actual-targets)
|
||||
: $(self.actual-sources) : [ $(properties).raw ] ;
|
||||
|
||||
# Since we set up the creating action here, we set up the action for
|
||||
@@ -865,6 +867,19 @@ class action
|
||||
{
|
||||
return $(property-set) ;
|
||||
}
|
||||
|
||||
# Execute the action rule on the given targets, sources, and properties.
|
||||
# Since this does the final call to the engine action rule this takes
|
||||
# engine level targets and raw properties. One could override this, for
|
||||
# example, to set additional variables on hte target that might be
|
||||
# difficult to determine just using toolset flags.
|
||||
# Note, you must call this base rule when overriding as otherwise the
|
||||
# actions will not execute and the engine will not run commands.
|
||||
#
|
||||
rule execute ( action-name targets + : sources * : properties * )
|
||||
{
|
||||
indirect.call $(action-name) $(targets) : $(sources) : $(properties) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import alias ;
|
||||
import "class" : new ;
|
||||
import errors ;
|
||||
import feature ;
|
||||
import features/__init__ ;
|
||||
import features/__init_features__ ;
|
||||
import generators ;
|
||||
import numbers ;
|
||||
import os ;
|
||||
@@ -35,6 +35,10 @@ import virtual-target ;
|
||||
import message ;
|
||||
import convert ;
|
||||
|
||||
# Generators need the target types registered first. So this import needs
|
||||
# to be after that.
|
||||
import generators/__init_generators__ ;
|
||||
|
||||
# FIXME: the following generate module import is not needed here but removing it
|
||||
# too hastily will break using code (e.g. the main Boost library Jamroot file)
|
||||
# that forgot to import the generate module before calling the generate rule.
|
||||
@@ -48,221 +52,6 @@ variant release : <optimization>speed <debug-symbols>off <inlining>full
|
||||
variant profile : release : <profiling>on <debug-symbols>on ;
|
||||
|
||||
|
||||
class searched-lib-target : abstract-file-target
|
||||
{
|
||||
rule __init__ ( name
|
||||
: project
|
||||
: shared ?
|
||||
: search *
|
||||
: action
|
||||
)
|
||||
{
|
||||
abstract-file-target.__init__ $(name) : SEARCHED_LIB : $(project)
|
||||
: $(action) : ;
|
||||
|
||||
self.shared = $(shared) ;
|
||||
self.search = $(search) ;
|
||||
}
|
||||
|
||||
rule shared ( )
|
||||
{
|
||||
return $(self.shared) ;
|
||||
}
|
||||
|
||||
rule search ( )
|
||||
{
|
||||
return $(self.search) ;
|
||||
}
|
||||
|
||||
rule actualize-location ( target )
|
||||
{
|
||||
NOTFILE $(target) ;
|
||||
}
|
||||
|
||||
rule path ( )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# The generator class for libraries (target type LIB). Depending on properties
|
||||
# it will request building of the appropriate specific library type --
|
||||
# -- SHARED_LIB, STATIC_LIB or SHARED_LIB.
|
||||
#
|
||||
class lib-generator : generator
|
||||
{
|
||||
rule __init__ ( * : * )
|
||||
{
|
||||
generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8)
|
||||
: $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) :
|
||||
$(17) : $(18) : $(19) ;
|
||||
}
|
||||
|
||||
rule run ( project name ? : property-set : sources * )
|
||||
{
|
||||
# The lib generator is composing, and can be only invoked with an
|
||||
# explicit name. This check is present in generator.run (and so in
|
||||
# builtin.linking-generator) but duplicated here to avoid doing extra
|
||||
# work.
|
||||
if $(name)
|
||||
{
|
||||
local properties = [ $(property-set).raw ] ;
|
||||
# Determine the needed target type.
|
||||
local actual-type ;
|
||||
# <source>files can be generated by <conditional>@rule feature
|
||||
# in which case we do not consider it a SEARCHED_LIB type.
|
||||
if ! <source> in $(properties:G) &&
|
||||
( <search> in $(properties:G) || <name> in $(properties:G) )
|
||||
{
|
||||
actual-type = SEARCHED_LIB ;
|
||||
}
|
||||
else if <file> in $(properties:G)
|
||||
{
|
||||
actual-type = LIB ;
|
||||
}
|
||||
else if <link>shared in $(properties)
|
||||
{
|
||||
actual-type = SHARED_LIB ;
|
||||
}
|
||||
else
|
||||
{
|
||||
actual-type = STATIC_LIB ;
|
||||
}
|
||||
property-set = [ $(property-set).add-raw <main-target-type>LIB ] ;
|
||||
# Construct the target.
|
||||
return [ generators.construct $(project) $(name) : $(actual-type)
|
||||
: $(property-set) : $(sources) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
rule viable-source-types ( )
|
||||
{
|
||||
return * ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
generators.register [ new lib-generator builtin.lib-generator : : LIB ] ;
|
||||
|
||||
|
||||
# The implementation of the 'lib' rule. Beyond standard syntax that rule allows
|
||||
# simplified: "lib a b c ;".
|
||||
#
|
||||
rule lib ( names + : sources * : requirements * : default-build * :
|
||||
usage-requirements * )
|
||||
{
|
||||
if $(names[2])
|
||||
{
|
||||
if <name> in $(requirements:G)
|
||||
{
|
||||
errors.user-error "When several names are given to the 'lib' rule" :
|
||||
"it is not allowed to specify the <name> feature." ;
|
||||
}
|
||||
if $(sources)
|
||||
{
|
||||
errors.user-error "When several names are given to the 'lib' rule" :
|
||||
"it is not allowed to specify sources." ;
|
||||
}
|
||||
}
|
||||
|
||||
# This is a circular module dependency so it must be imported here.
|
||||
import targets ;
|
||||
|
||||
local project = [ project.current ] ;
|
||||
local result ;
|
||||
|
||||
for local name in $(names)
|
||||
{
|
||||
local r = $(requirements) ;
|
||||
# Support " lib a ; " and " lib a b c ; " syntax.
|
||||
if ! $(sources) && ! <name> in $(requirements:G)
|
||||
&& ! <file> in $(requirements:G)
|
||||
{
|
||||
r += <name>$(name) ;
|
||||
}
|
||||
result += [ targets.main-target-alternative
|
||||
[ new typed-target $(name) : $(project) : LIB
|
||||
: [ targets.main-target-sources $(sources) : $(name) ]
|
||||
: [ targets.main-target-requirements $(r) : $(project) ]
|
||||
: [ targets.main-target-default-build $(default-build) : $(project) ]
|
||||
: [ targets.main-target-usage-requirements $(usage-requirements) : $(project) ]
|
||||
] ] ;
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
IMPORT $(__name__) : lib : : lib ;
|
||||
|
||||
|
||||
class searched-lib-generator : generator
|
||||
{
|
||||
import property-set ;
|
||||
|
||||
rule __init__ ( )
|
||||
{
|
||||
# The requirements cause the generators to be tried *only* when we are
|
||||
# building a lib target with a 'search' feature. This seems ugly --- all
|
||||
# we want is to make sure searched-lib-generator is not invoked deep
|
||||
# inside transformation search to produce intermediate targets.
|
||||
generator.__init__ searched-lib-generator : : SEARCHED_LIB ;
|
||||
}
|
||||
|
||||
rule run ( project name ? : property-set : sources * )
|
||||
{
|
||||
if $(name)
|
||||
{
|
||||
# If 'name' is empty, it means we have not been called to build a
|
||||
# top-level target. In this case, we just fail immediately, because
|
||||
# searched-lib-generator cannot be used to produce intermediate
|
||||
# targets.
|
||||
|
||||
local properties = [ $(property-set).raw ] ;
|
||||
local shared ;
|
||||
if <link>shared in $(properties)
|
||||
{
|
||||
shared = true ;
|
||||
}
|
||||
|
||||
local search = [ feature.get-values <search> : $(properties) ] ;
|
||||
|
||||
local a = [ new null-action $(property-set) ] ;
|
||||
local lib-name = [ feature.get-values <name> : $(properties) ] ;
|
||||
lib-name ?= $(name) ;
|
||||
local t = [ new searched-lib-target $(lib-name) : $(project)
|
||||
: $(shared) : $(search) : $(a) ] ;
|
||||
# We return sources for a simple reason. If there is
|
||||
# lib png : z : <name>png ;
|
||||
# the 'z' target should be returned, so that apps linking to 'png'
|
||||
# will link to 'z', too.
|
||||
return [ property-set.create <xdll-path>$(search) ]
|
||||
[ virtual-target.register $(t) ] $(sources) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
generators.register [ new searched-lib-generator ] ;
|
||||
|
||||
|
||||
class prebuilt-lib-generator : generator
|
||||
{
|
||||
rule __init__ ( * : * )
|
||||
{
|
||||
generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8)
|
||||
: $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) :
|
||||
$(17) : $(18) : $(19) ;
|
||||
}
|
||||
|
||||
rule run ( project name ? : property-set : sources * )
|
||||
{
|
||||
local f = [ $(property-set).get <file> ] ;
|
||||
return $(f) $(sources) ;
|
||||
}
|
||||
}
|
||||
|
||||
generators.register
|
||||
[ new prebuilt-lib-generator builtin.prebuilt : : LIB : <file> ] ;
|
||||
|
||||
generators.override builtin.prebuilt : builtin.lib-generator ;
|
||||
|
||||
class preprocessed-target-class : basic-target
|
||||
{
|
||||
import generators ;
|
||||
@@ -305,322 +94,3 @@ rule preprocessed ( name : sources * : requirements * : default-build * :
|
||||
}
|
||||
|
||||
IMPORT $(__name__) : preprocessed : : preprocessed ;
|
||||
|
||||
class compile-action : action
|
||||
{
|
||||
import sequence ;
|
||||
|
||||
rule __init__ ( targets * : sources * : action-name : properties * )
|
||||
{
|
||||
action.__init__ $(targets) : $(sources) : $(action-name) : $(properties) ;
|
||||
}
|
||||
|
||||
# For all virtual targets for the same dependency graph as self, i.e. which
|
||||
# belong to the same main target, add their directories to the include path.
|
||||
#
|
||||
rule adjust-properties ( property-set )
|
||||
{
|
||||
local s = [ $(self.targets[1]).creating-subvariant ] ;
|
||||
if $(s)
|
||||
{
|
||||
return [ $(property-set).add-raw
|
||||
[ $(s).implicit-includes "include" : H ] ] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $(property-set) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Declare a special compiler generator. The only thing it does is changing the
|
||||
# type used to represent 'action' in the constructed dependency graph to
|
||||
# 'compile-action'. That class in turn adds additional include paths to handle
|
||||
# cases when a source file includes headers which are generated themselves.
|
||||
#
|
||||
class C-compiling-generator : generator
|
||||
{
|
||||
rule __init__ ( id : source-types + : target-types + : requirements *
|
||||
: optional-properties * )
|
||||
{
|
||||
generator.__init__ $(id) : $(source-types) : $(target-types) :
|
||||
$(requirements) : $(optional-properties) ;
|
||||
}
|
||||
|
||||
rule action-class ( )
|
||||
{
|
||||
return compile-action ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule register-c-compiler ( id : source-types + : target-types + : requirements *
|
||||
: optional-properties * )
|
||||
{
|
||||
generators.register [ new C-compiling-generator $(id) : $(source-types) :
|
||||
$(target-types) : $(requirements) : $(optional-properties) ] ;
|
||||
}
|
||||
|
||||
# FIXME: this is ugly, should find a better way (we would like client code to
|
||||
# register all generators as "generators.some-rule" instead of
|
||||
# "some-module.some-rule".)
|
||||
#
|
||||
IMPORT $(__name__) : register-c-compiler : : generators.register-c-compiler ;
|
||||
|
||||
|
||||
# The generator class for handling EXE and SHARED_LIB creation.
|
||||
#
|
||||
class linking-generator : generator
|
||||
{
|
||||
import path ;
|
||||
import project ;
|
||||
import property-set ;
|
||||
import type ;
|
||||
|
||||
rule __init__ ( id
|
||||
composing ? : # The generator will be composing if a non-empty
|
||||
# string is passed or the parameter is not given. To
|
||||
# make the generator non-composing, pass an empty
|
||||
# string ("").
|
||||
source-types + :
|
||||
target-types + :
|
||||
requirements * )
|
||||
{
|
||||
composing ?= true ;
|
||||
generator.__init__ $(id) $(composing) : $(source-types)
|
||||
: $(target-types) : $(requirements) ;
|
||||
}
|
||||
|
||||
rule run ( project name ? : property-set : sources + )
|
||||
{
|
||||
sources += [ $(property-set).get <library> ] ;
|
||||
|
||||
# Add <library-path> properties for all searched libraries.
|
||||
local extra ;
|
||||
for local s in $(sources)
|
||||
{
|
||||
if [ $(s).type ] = SEARCHED_LIB
|
||||
{
|
||||
local search = [ $(s).search ] ;
|
||||
extra += <library-path>$(search) ;
|
||||
}
|
||||
}
|
||||
|
||||
# It is possible that sources include shared libraries that did not came
|
||||
# from 'lib' targets, e.g. .so files specified as sources. In this case
|
||||
# we have to add extra dll-path properties and propagate extra xdll-path
|
||||
# properties so that application linking to us will get xdll-path to
|
||||
# those libraries.
|
||||
local extra-xdll-paths ;
|
||||
for local s in $(sources)
|
||||
{
|
||||
if [ type.is-derived [ $(s).type ] SHARED_LIB ] && ! [ $(s).action ]
|
||||
{
|
||||
# Unfortunately, we do not have a good way to find the path to a
|
||||
# file, so use this nasty approach.
|
||||
#
|
||||
# TODO: This needs to be done better. One thing that is really
|
||||
# broken with this is that it does not work correctly with
|
||||
# projects having multiple source locations.
|
||||
local p = [ $(s).project ] ;
|
||||
local location = [ path.root [ $(s).name ]
|
||||
[ $(p).get source-location ] ] ;
|
||||
extra-xdll-paths += [ path.parent $(location) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
# Hardcode DLL paths only when linking executables.
|
||||
# Pros: do not need to relink libraries when installing.
|
||||
# Cons: "standalone" libraries (plugins, python extensions) can not
|
||||
# hardcode paths to dependent libraries.
|
||||
if [ $(property-set).get <hardcode-dll-paths> ] = true
|
||||
&& [ type.is-derived $(self.target-types[1]) EXE ]
|
||||
{
|
||||
local xdll-path = [ $(property-set).get <xdll-path> ] ;
|
||||
extra += <dll-path>$(xdll-path) <dll-path>$(extra-xdll-paths) ;
|
||||
}
|
||||
|
||||
if $(extra)
|
||||
{
|
||||
property-set = [ $(property-set).add-raw $(extra) ] ;
|
||||
}
|
||||
|
||||
local result = [ generator.run $(project) $(name) : $(property-set)
|
||||
: $(sources) ] ;
|
||||
|
||||
local ur ;
|
||||
if $(result)
|
||||
{
|
||||
ur = [ extra-usage-requirements $(result) : $(property-set) ] ;
|
||||
ur = [ $(ur).add
|
||||
[ property-set.create <xdll-path>$(extra-xdll-paths) ] ] ;
|
||||
}
|
||||
return $(ur) $(result) ;
|
||||
}
|
||||
|
||||
rule extra-usage-requirements ( created-targets * : property-set )
|
||||
{
|
||||
local result = [ property-set.empty ] ;
|
||||
local extra ;
|
||||
|
||||
# Add appropriate <xdll-path> usage requirements.
|
||||
local raw = [ $(property-set).raw ] ;
|
||||
if <link>shared in $(raw)
|
||||
{
|
||||
local paths ;
|
||||
local pwd = [ path.pwd ] ;
|
||||
for local t in $(created-targets)
|
||||
{
|
||||
if [ type.is-derived [ $(t).type ] SHARED_LIB ]
|
||||
{
|
||||
paths += [ path.root [ path.make [ $(t).path ] ] $(pwd) ] ;
|
||||
}
|
||||
}
|
||||
extra += $(paths:G=<xdll-path>) ;
|
||||
}
|
||||
|
||||
# We need to pass <xdll-path> features that we've got from sources,
|
||||
# because if a shared library is built, exe using it needs to know paths
|
||||
# to other shared libraries this one depends on in order to be able to
|
||||
# find them all at runtime.
|
||||
|
||||
# Just pass all features in property-set, it is theoretically possible
|
||||
# that we will propagate <xdll-path> features explicitly specified by
|
||||
# the user, but then the user is to blame for using an internal feature.
|
||||
local values = [ $(property-set).get <xdll-path> ] ;
|
||||
extra += $(values:G=<xdll-path>) ;
|
||||
|
||||
if $(extra)
|
||||
{
|
||||
result = [ property-set.create $(extra) ] ;
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
rule generated-targets ( sources + : property-set : project name ? )
|
||||
{
|
||||
local sources2 ; # Sources to pass to inherited rule.
|
||||
local properties2 ; # Properties to pass to inherited rule.
|
||||
local libraries ; # Library sources.
|
||||
|
||||
# Searched libraries are not passed as arguments to the linker but via
|
||||
# some option. So, we pass them to the action using a property.
|
||||
properties2 = [ $(property-set).raw ] ;
|
||||
local fsa ;
|
||||
local fst ;
|
||||
for local s in $(sources)
|
||||
{
|
||||
if [ type.is-derived [ $(s).type ] SEARCHED_LIB ]
|
||||
{
|
||||
local name = [ $(s).name ] ;
|
||||
if [ $(s).shared ]
|
||||
{
|
||||
fsa += $(name) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
fst += $(name) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sources2 += $(s) ;
|
||||
}
|
||||
}
|
||||
properties2 += <find-shared-library>$(fsa:J=&&)
|
||||
<find-static-library>$(fst:J=&&) ;
|
||||
|
||||
return [ generator.generated-targets $(sources2)
|
||||
: [ property-set.create $(properties2) ] : $(project) $(name) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule register-linker ( id composing ? : source-types + : target-types +
|
||||
: requirements * )
|
||||
{
|
||||
generators.register [ new linking-generator $(id) $(composing)
|
||||
: $(source-types) : $(target-types) : $(requirements) ] ;
|
||||
}
|
||||
|
||||
|
||||
# The generator class for handling STATIC_LIB creation.
|
||||
#
|
||||
class archive-generator : generator
|
||||
{
|
||||
import property-set ;
|
||||
|
||||
rule __init__ ( id composing ? : source-types + : target-types +
|
||||
: requirements * )
|
||||
{
|
||||
composing ?= true ;
|
||||
generator.__init__ $(id) $(composing) : $(source-types)
|
||||
: $(target-types) : $(requirements) ;
|
||||
}
|
||||
|
||||
rule run ( project name ? : property-set : sources + )
|
||||
{
|
||||
sources += [ $(property-set).get <library> ] ;
|
||||
|
||||
local result = [ generator.run $(project) $(name) : $(property-set)
|
||||
: $(sources) ] ;
|
||||
|
||||
# For static linking, if we get a library in source, we can not directly
|
||||
# link to it so we need to cause our dependencies to link to that
|
||||
# library. There are two approaches:
|
||||
# - adding the library to the list of returned targets.
|
||||
# - using the <library> usage requirements.
|
||||
# The problem with the first is:
|
||||
#
|
||||
# lib a1 : : <file>liba1.a ;
|
||||
# lib a2 : a2.cpp a1 : <link>static ;
|
||||
# install dist : a2 ;
|
||||
#
|
||||
# here we will try to install 'a1', even though it is not necessary in
|
||||
# the general case. With the second approach, even indirect dependants
|
||||
# will link to the library, but it should not cause any harm. So, return
|
||||
# all LIB sources together with created targets, so that dependants link
|
||||
# to them.
|
||||
local usage-requirements ;
|
||||
if [ $(property-set).get <link> ] = static
|
||||
{
|
||||
for local t in $(sources)
|
||||
{
|
||||
if [ type.is-derived [ $(t).type ] LIB ]
|
||||
{
|
||||
usage-requirements += <library>$(t) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
usage-requirements = [ property-set.create $(usage-requirements) ] ;
|
||||
|
||||
return $(usage-requirements) $(result) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule register-archiver ( id composing ? : source-types + : target-types +
|
||||
: requirements * )
|
||||
{
|
||||
generators.register [ new archive-generator $(id) $(composing)
|
||||
: $(source-types) : $(target-types) : $(requirements) ] ;
|
||||
}
|
||||
|
||||
|
||||
# Generator that accepts everything and produces nothing. Useful as a general
|
||||
# fallback for toolset-specific actions like PCH generation.
|
||||
#
|
||||
class dummy-generator : generator
|
||||
{
|
||||
import property-set ;
|
||||
|
||||
rule run ( project name ? : property-set : sources + )
|
||||
{
|
||||
return [ property-set.empty ] ;
|
||||
}
|
||||
}
|
||||
|
||||
IMPORT $(__name__) : register-linker register-archiver
|
||||
: : generators.register-linker generators.register-archiver ;
|
||||
|
||||
@@ -66,8 +66,15 @@ rule init ( version ? : command * : options * )
|
||||
|
||||
common.handle-options clang-darwin : $(condition) : $(command) : $(options) ;
|
||||
|
||||
gcc.init-link-flags clang-darwin darwin $(condition) ;
|
||||
gcc.init-link-flags clang darwin $(condition) ;
|
||||
|
||||
# - Ranlib.
|
||||
local ranlib = [ feature.get-values <ranlib> : $(options) ] ;
|
||||
toolset.flags clang-darwin.archive .RANLIB $(condition) : $(ranlib[1]) ;
|
||||
|
||||
# - Archive builder.
|
||||
local archiver = [ feature.get-values <archiver> : $(options) ] ;
|
||||
toolset.flags clang-darwin.archive .AR $(condition) : $(archiver[1]) ;
|
||||
}
|
||||
|
||||
SPACE = " " ;
|
||||
@@ -128,6 +135,7 @@ flags clang-darwin ARFLAGS <archiveflags> ;
|
||||
# logic in clang-linux, but that's hardly worth the trouble
|
||||
# as on Linux, 'ar' is always available.
|
||||
.AR = ar ;
|
||||
.RANLIB = ranlib -cs ;
|
||||
|
||||
rule archive ( targets * : sources * : properties * )
|
||||
{
|
||||
@@ -161,7 +169,7 @@ rule archive ( targets * : sources * : properties * )
|
||||
actions piecemeal archive
|
||||
{
|
||||
"$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
|
||||
"ranlib" -cs "$(<)"
|
||||
"$(.RANLIB)" "$(<)"
|
||||
}
|
||||
|
||||
flags clang-darwin.link USER_OPTIONS <linkflags> ;
|
||||
|
||||
@@ -60,7 +60,15 @@ rule init ( version ? : command * : options * ) {
|
||||
|
||||
common.handle-options clang-linux : $(condition) : $(command) : $(options) ;
|
||||
|
||||
gcc.init-link-flags clang-linux gnu $(condition) ;
|
||||
gcc.init-link-flags clang linux $(condition) ;
|
||||
|
||||
# - Ranlib.
|
||||
local ranlib = [ feature.get-values <ranlib> : $(options) ] ;
|
||||
toolset.flags clang-linux.archive .RANLIB $(condition) : $(ranlib[1]) ;
|
||||
|
||||
# - Archive builder.
|
||||
local archiver = [ feature.get-values <archiver> : $(options) ] ;
|
||||
toolset.flags clang-linux.archive .AR $(condition) : $(archiver[1]) ;
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
@@ -92,10 +100,6 @@ toolset.flags clang-linux.compile OPTIONS <rtti>off : -fno-rtti ;
|
||||
# C and C++ compilation
|
||||
|
||||
rule compile.c++ ( targets * : sources * : properties * ) {
|
||||
setup-threading $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
|
||||
|
||||
local pth-file = [ on $(<) return $(PCH_FILE) ] ;
|
||||
|
||||
if $(pth-file) {
|
||||
@@ -118,10 +122,6 @@ actions compile.c++.with-pch bind PCH_FILE
|
||||
|
||||
rule compile.c ( targets * : sources * : properties * )
|
||||
{
|
||||
setup-threading $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
|
||||
|
||||
local pth-file = [ on $(<) return $(PCH_FILE) ] ;
|
||||
|
||||
if $(pth-file) {
|
||||
@@ -147,9 +147,6 @@ actions compile.c.with-pch bind PCH_FILE
|
||||
# PCH emission
|
||||
|
||||
rule compile.c++.pch ( targets * : sources * : properties * ) {
|
||||
setup-threading $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
|
||||
}
|
||||
|
||||
actions compile.c++.pch {
|
||||
@@ -157,9 +154,6 @@ actions compile.c++.pch {
|
||||
}
|
||||
|
||||
rule compile.c.pch ( targets * : sources * : properties * ) {
|
||||
setup-threading $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
|
||||
}
|
||||
|
||||
actions compile.c.pch
|
||||
@@ -173,8 +167,6 @@ actions compile.c.pch
|
||||
SPACE = " " ;
|
||||
|
||||
rule link ( targets * : sources * : properties * ) {
|
||||
setup-threading $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
|
||||
SPACE on $(targets) = " " ;
|
||||
JAM_SEMAPHORE on $(targets) = <s>clang-linux-link-semaphore ;
|
||||
}
|
||||
@@ -184,29 +176,10 @@ actions link bind LIBRARIES {
|
||||
}
|
||||
|
||||
rule link.dll ( targets * : sources * : properties * ) {
|
||||
setup-threading $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
|
||||
SPACE on $(targets) = " " ;
|
||||
JAM_SEMAPHORE on $(targets) = <s>clang-linux-link-semaphore ;
|
||||
}
|
||||
|
||||
rule setup-threading ( targets * : sources * : properties * )
|
||||
{
|
||||
|
||||
local target = [ feature.get-values target-os : $(properties) ] ;
|
||||
|
||||
switch $(target)
|
||||
{
|
||||
case windows :
|
||||
local threading = [ feature.get-values threading : $(properties) ] ;
|
||||
if $(threading) = multi
|
||||
{
|
||||
OPTIONS on $(targets) += -pthread ;
|
||||
}
|
||||
case * : gcc.setup-threading $(targets) : $(sources) : $(properties) ;
|
||||
}
|
||||
}
|
||||
|
||||
# Differ from 'link' above only by -shared.
|
||||
actions link.dll bind LIBRARIES {
|
||||
"$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -o "$(<)" -Wl,-soname$(SPACE)-Wl,$(<[1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
|
||||
|
||||
@@ -208,6 +208,13 @@ rule check-init-parameters ( toolset requirement * : * )
|
||||
}
|
||||
sig = $(sig)$(value:E="")- ;
|
||||
}
|
||||
# We also need to consider requirements on the toolset as we can
|
||||
# configure the same toolset multiple times with different options that
|
||||
# are selected with the requirements.
|
||||
if $(requirement)
|
||||
{
|
||||
sig = $(sig)$(requirement:J=,) ;
|
||||
}
|
||||
if $(sig) in $(.all-signatures)
|
||||
{
|
||||
local message =
|
||||
|
||||
@@ -516,20 +516,10 @@ rule setup-address-model ( targets * : sources * : properties * )
|
||||
}
|
||||
}
|
||||
|
||||
rule setup-threading ( targets * : sources * : properties * )
|
||||
{
|
||||
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
|
||||
}
|
||||
|
||||
rule setup-fpic ( targets * : sources * : properties * )
|
||||
{
|
||||
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
|
||||
}
|
||||
|
||||
rule compile.m ( targets * : sources * : properties * )
|
||||
{
|
||||
LANG on $(<) = "-x objective-c" ;
|
||||
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
|
||||
gcc.set-fpic-options $(targets) : $(sources) : $(properties) ;
|
||||
setup-address-model $(targets) : $(sources) : $(properties) ;
|
||||
}
|
||||
|
||||
@@ -541,7 +531,7 @@ actions compile.m
|
||||
rule compile.mm ( targets * : sources * : properties * )
|
||||
{
|
||||
LANG on $(<) = "-x objective-c++" ;
|
||||
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
|
||||
gcc.set-fpic-options $(targets) : $(sources) : $(properties) ;
|
||||
setup-address-model $(targets) : $(sources) : $(properties) ;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,19 +3,21 @@
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
# Here we automatically define any feature modules in this directory.
|
||||
# Here we automatically define any "feature" modules in this directory.
|
||||
|
||||
local key = feature ;
|
||||
|
||||
import os path modules ;
|
||||
|
||||
.this-module's-file = [ modules.binding $(__name__) ] ;
|
||||
.this-module's-dir = [ path.parent [ path.make $(.this-module's-file) ] ] ;
|
||||
.feature-jamfiles = [ path.glob $(.this-module's-dir) : *-feature.jam ] ;
|
||||
.feature-modules = [ MATCH ^(.*)\.jam$ : $(.feature-jamfiles) ] ;
|
||||
.to-load-jamfiles = [ path.glob $(.this-module's-dir) : *-$(key).jam ] ;
|
||||
.to-load-modules = [ MATCH ^(.*)\.jam$ : $(.to-load-jamfiles) ] ;
|
||||
|
||||
# A loop over all feature modules in this directory
|
||||
for local m in $(.feature-modules)
|
||||
# A loop over all matched modules in this directory
|
||||
for local m in $(.to-load-modules)
|
||||
{
|
||||
m = [ path.basename $(m) ] ;
|
||||
m = features/$(m) ;
|
||||
m = $(key)s/$(m) ;
|
||||
import $(m) ;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
23
src/tools/generators/__init_generators__.jam
Normal file
23
src/tools/generators/__init_generators__.jam
Normal file
@@ -0,0 +1,23 @@
|
||||
# Copyright 2017 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)
|
||||
|
||||
# Here we automatically define any "generator" modules in this directory.
|
||||
|
||||
local key = generator ;
|
||||
|
||||
import os path modules ;
|
||||
|
||||
.this-module's-file = [ modules.binding $(__name__) ] ;
|
||||
.this-module's-dir = [ path.parent [ path.make $(.this-module's-file) ] ] ;
|
||||
.to-load-jamfiles = [ path.glob $(.this-module's-dir) : *-$(key).jam ] ;
|
||||
.to-load-modules = [ MATCH ^(.*)\.jam$ : $(.to-load-jamfiles) ] ;
|
||||
|
||||
# A loop over all matched modules in this directory
|
||||
for local m in $(.to-load-modules)
|
||||
{
|
||||
m = [ path.basename $(m) ] ;
|
||||
m = $(key)s/$(m) ;
|
||||
import $(m) ;
|
||||
}
|
||||
73
src/tools/generators/archive-generator.jam
Normal file
73
src/tools/generators/archive-generator.jam
Normal file
@@ -0,0 +1,73 @@
|
||||
# Copyright 2002-2017 Rene Rivera
|
||||
# Copyright 2002-2017 Vladimir Prus
|
||||
# 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 "class" : new ;
|
||||
import generators ;
|
||||
|
||||
# The generator class for handling STATIC_LIB creation.
|
||||
#
|
||||
class archive-generator : generator
|
||||
{
|
||||
import property-set ;
|
||||
|
||||
rule __init__ ( id composing ? : source-types + : target-types +
|
||||
: requirements * )
|
||||
{
|
||||
composing ?= true ;
|
||||
generator.__init__ $(id) $(composing) : $(source-types)
|
||||
: $(target-types) : $(requirements) ;
|
||||
}
|
||||
|
||||
rule run ( project name ? : property-set : sources + )
|
||||
{
|
||||
sources += [ $(property-set).get <library> ] ;
|
||||
|
||||
local result = [ generator.run $(project) $(name) : $(property-set)
|
||||
: $(sources) ] ;
|
||||
|
||||
# For static linking, if we get a library in source, we can not directly
|
||||
# link to it so we need to cause our dependencies to link to that
|
||||
# library. There are two approaches:
|
||||
# - adding the library to the list of returned targets.
|
||||
# - using the <library> usage requirements.
|
||||
# The problem with the first is:
|
||||
#
|
||||
# lib a1 : : <file>liba1.a ;
|
||||
# lib a2 : a2.cpp a1 : <link>static ;
|
||||
# install dist : a2 ;
|
||||
#
|
||||
# here we will try to install 'a1', even though it is not necessary in
|
||||
# the general case. With the second approach, even indirect dependants
|
||||
# will link to the library, but it should not cause any harm. So, return
|
||||
# all LIB sources together with created targets, so that dependants link
|
||||
# to them.
|
||||
local usage-requirements ;
|
||||
if [ $(property-set).get <link> ] = static
|
||||
{
|
||||
for local t in $(sources)
|
||||
{
|
||||
if [ type.is-derived [ $(t).type ] LIB ]
|
||||
{
|
||||
usage-requirements += <library>$(t) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
usage-requirements = [ property-set.create $(usage-requirements) ] ;
|
||||
|
||||
return $(usage-requirements) $(result) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule register-archiver ( id composing ? : source-types + : target-types +
|
||||
: requirements * )
|
||||
{
|
||||
generators.register [ new archive-generator $(id) $(composing)
|
||||
: $(source-types) : $(target-types) : $(requirements) ] ;
|
||||
}
|
||||
|
||||
IMPORT $(__name__) : register-archiver : : generators.register-archiver ;
|
||||
70
src/tools/generators/c-compiling-generator.jam
Normal file
70
src/tools/generators/c-compiling-generator.jam
Normal file
@@ -0,0 +1,70 @@
|
||||
# Copyright 2002-2017 Rene Rivera
|
||||
# Copyright 2002-2017 Vladimir Prus
|
||||
# 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 "class" : new ;
|
||||
import generators ;
|
||||
import virtual-target ;
|
||||
|
||||
# Declare a special compiler generator. The only thing it does is changing the
|
||||
# type used to represent 'action' in the constructed dependency graph to
|
||||
# 'compile-action'. That class in turn adds additional include paths to handle
|
||||
# cases when a source file includes headers which are generated themselves.
|
||||
#
|
||||
class C-compiling-generator : generator
|
||||
{
|
||||
rule __init__ ( id : source-types + : target-types + : requirements *
|
||||
: optional-properties * )
|
||||
{
|
||||
generator.__init__ $(id) : $(source-types) : $(target-types) :
|
||||
$(requirements) : $(optional-properties) ;
|
||||
}
|
||||
|
||||
rule action-class ( )
|
||||
{
|
||||
return compile-action ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule register-c-compiler ( id : source-types + : target-types + : requirements *
|
||||
: optional-properties * )
|
||||
{
|
||||
generators.register [ new C-compiling-generator $(id) : $(source-types) :
|
||||
$(target-types) : $(requirements) : $(optional-properties) ] ;
|
||||
}
|
||||
|
||||
# FIXME: this is ugly, should find a better way (we would like client code to
|
||||
# register all generators as "generators.some-rule" instead of
|
||||
# "some-module.some-rule".)
|
||||
#
|
||||
IMPORT $(__name__) : register-c-compiler : : generators.register-c-compiler ;
|
||||
|
||||
class compile-action : action
|
||||
{
|
||||
import sequence ;
|
||||
|
||||
rule __init__ ( targets * : sources * : action-name : properties * )
|
||||
{
|
||||
action.__init__ $(targets) : $(sources) : $(action-name) : $(properties) ;
|
||||
}
|
||||
|
||||
# For all virtual targets for the same dependency graph as self, i.e. which
|
||||
# belong to the same main target, add their directories to the include path.
|
||||
#
|
||||
rule adjust-properties ( property-set )
|
||||
{
|
||||
local s = [ $(self.targets[1]).creating-subvariant ] ;
|
||||
if $(s)
|
||||
{
|
||||
return [ $(property-set).add-raw
|
||||
[ $(s).implicit-includes "include" : H ] ] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $(property-set) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
20
src/tools/generators/dummy-generator.jam
Normal file
20
src/tools/generators/dummy-generator.jam
Normal file
@@ -0,0 +1,20 @@
|
||||
# Copyright 2002-2017 Rene Rivera
|
||||
# Copyright 2002-2017 Vladimir Prus
|
||||
# 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 generators ;
|
||||
|
||||
# Generator that accepts everything and produces nothing. Useful as a general
|
||||
# fallback for toolset-specific actions like PCH generation.
|
||||
#
|
||||
class dummy-generator : generator
|
||||
{
|
||||
import property-set ;
|
||||
|
||||
rule run ( project name ? : property-set : sources + )
|
||||
{
|
||||
return [ property-set.empty ] ;
|
||||
}
|
||||
}
|
||||
115
src/tools/generators/lib-generator.jam
Normal file
115
src/tools/generators/lib-generator.jam
Normal file
@@ -0,0 +1,115 @@
|
||||
# Copyright 2002-2017 Rene Rivera
|
||||
# Copyright 2002-2017 Vladimir Prus
|
||||
# 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 "class" : new ;
|
||||
import generators ;
|
||||
import project ;
|
||||
import targets ;
|
||||
|
||||
# The generator class for libraries (target type LIB). Depending on properties
|
||||
# it will request building of the appropriate specific library type --
|
||||
# -- SHARED_LIB, STATIC_LIB or SHARED_LIB.
|
||||
#
|
||||
class lib-generator : generator
|
||||
{
|
||||
rule __init__ ( * : * )
|
||||
{
|
||||
generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8)
|
||||
: $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) :
|
||||
$(17) : $(18) : $(19) ;
|
||||
}
|
||||
|
||||
rule run ( project name ? : property-set : sources * )
|
||||
{
|
||||
# The lib generator is composing, and can be only invoked with an
|
||||
# explicit name. This check is present in generator.run (and so in
|
||||
# builtin.linking-generator) but duplicated here to avoid doing extra
|
||||
# work.
|
||||
if $(name)
|
||||
{
|
||||
local properties = [ $(property-set).raw ] ;
|
||||
# Determine the needed target type.
|
||||
local actual-type ;
|
||||
# <source>files can be generated by <conditional>@rule feature
|
||||
# in which case we do not consider it a SEARCHED_LIB type.
|
||||
if ! <source> in $(properties:G) &&
|
||||
( <search> in $(properties:G) || <name> in $(properties:G) )
|
||||
{
|
||||
actual-type = SEARCHED_LIB ;
|
||||
}
|
||||
else if <file> in $(properties:G)
|
||||
{
|
||||
actual-type = LIB ;
|
||||
}
|
||||
else if <link>shared in $(properties)
|
||||
{
|
||||
actual-type = SHARED_LIB ;
|
||||
}
|
||||
else
|
||||
{
|
||||
actual-type = STATIC_LIB ;
|
||||
}
|
||||
property-set = [ $(property-set).add-raw <main-target-type>LIB ] ;
|
||||
# Construct the target.
|
||||
return [ generators.construct $(project) $(name) : $(actual-type)
|
||||
: $(property-set) : $(sources) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
rule viable-source-types ( )
|
||||
{
|
||||
return * ;
|
||||
}
|
||||
}
|
||||
|
||||
generators.register [ new lib-generator builtin.lib-generator : : LIB ] ;
|
||||
|
||||
# The implementation of the 'lib' rule. Beyond standard syntax that rule allows
|
||||
# simplified: "lib a b c ;".
|
||||
#
|
||||
rule lib ( names + : sources * : requirements * : default-build * :
|
||||
usage-requirements * )
|
||||
{
|
||||
if $(names[2])
|
||||
{
|
||||
if <name> in $(requirements:G)
|
||||
{
|
||||
errors.user-error "When several names are given to the 'lib' rule" :
|
||||
"it is not allowed to specify the <name> feature." ;
|
||||
}
|
||||
if $(sources)
|
||||
{
|
||||
errors.user-error "When several names are given to the 'lib' rule" :
|
||||
"it is not allowed to specify sources." ;
|
||||
}
|
||||
}
|
||||
|
||||
# This is a circular module dependency so it must be imported here.
|
||||
import targets ;
|
||||
|
||||
local project = [ project.current ] ;
|
||||
local result ;
|
||||
|
||||
for local name in $(names)
|
||||
{
|
||||
local r = $(requirements) ;
|
||||
# Support " lib a ; " and " lib a b c ; " syntax.
|
||||
if ! $(sources) && ! <name> in $(requirements:G)
|
||||
&& ! <file> in $(requirements:G)
|
||||
{
|
||||
r += <name>$(name) ;
|
||||
}
|
||||
result += [ targets.main-target-alternative
|
||||
[ new typed-target $(name) : $(project) : LIB
|
||||
: [ targets.main-target-sources $(sources) : $(name) ]
|
||||
: [ targets.main-target-requirements $(r) : $(project) ]
|
||||
: [ targets.main-target-default-build $(default-build) : $(project) ]
|
||||
: [ targets.main-target-usage-requirements $(usage-requirements) : $(project) ]
|
||||
] ] ;
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
IMPORT $(__name__) : lib : : lib ;
|
||||
185
src/tools/generators/linking-generator.jam
Normal file
185
src/tools/generators/linking-generator.jam
Normal file
@@ -0,0 +1,185 @@
|
||||
# Copyright 2002-2017 Rene Rivera
|
||||
# Copyright 2002-2017 Vladimir Prus
|
||||
# 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 "class" : new ;
|
||||
import generators ;
|
||||
|
||||
# The generator class for handling EXE and SHARED_LIB creation.
|
||||
#
|
||||
class linking-generator : generator
|
||||
{
|
||||
import path ;
|
||||
import project ;
|
||||
import property-set ;
|
||||
import type ;
|
||||
|
||||
rule __init__ ( id
|
||||
composing ? : # The generator will be composing if a non-empty
|
||||
# string is passed or the parameter is not given. To
|
||||
# make the generator non-composing, pass an empty
|
||||
# string ("").
|
||||
source-types + :
|
||||
target-types + :
|
||||
requirements * )
|
||||
{
|
||||
composing ?= true ;
|
||||
generator.__init__ $(id) $(composing) : $(source-types)
|
||||
: $(target-types) : $(requirements) ;
|
||||
}
|
||||
|
||||
rule run ( project name ? : property-set : sources + )
|
||||
{
|
||||
sources += [ $(property-set).get <library> ] ;
|
||||
|
||||
# Add <library-path> properties for all searched libraries.
|
||||
local extra ;
|
||||
for local s in $(sources)
|
||||
{
|
||||
if [ $(s).type ] = SEARCHED_LIB
|
||||
{
|
||||
local search = [ $(s).search ] ;
|
||||
extra += <library-path>$(search) ;
|
||||
}
|
||||
}
|
||||
|
||||
# It is possible that sources include shared libraries that did not came
|
||||
# from 'lib' targets, e.g. .so files specified as sources. In this case
|
||||
# we have to add extra dll-path properties and propagate extra xdll-path
|
||||
# properties so that application linking to us will get xdll-path to
|
||||
# those libraries.
|
||||
local extra-xdll-paths ;
|
||||
for local s in $(sources)
|
||||
{
|
||||
if [ type.is-derived [ $(s).type ] SHARED_LIB ] && ! [ $(s).action ]
|
||||
{
|
||||
# Unfortunately, we do not have a good way to find the path to a
|
||||
# file, so use this nasty approach.
|
||||
#
|
||||
# TODO: This needs to be done better. One thing that is really
|
||||
# broken with this is that it does not work correctly with
|
||||
# projects having multiple source locations.
|
||||
local p = [ $(s).project ] ;
|
||||
local location = [ path.root [ $(s).name ]
|
||||
[ $(p).get source-location ] ] ;
|
||||
extra-xdll-paths += [ path.parent $(location) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
# Hardcode DLL paths only when linking executables.
|
||||
# Pros: do not need to relink libraries when installing.
|
||||
# Cons: "standalone" libraries (plugins, python extensions) can not
|
||||
# hardcode paths to dependent libraries.
|
||||
if [ $(property-set).get <hardcode-dll-paths> ] = true
|
||||
&& [ type.is-derived $(self.target-types[1]) EXE ]
|
||||
{
|
||||
local xdll-path = [ $(property-set).get <xdll-path> ] ;
|
||||
extra += <dll-path>$(xdll-path) <dll-path>$(extra-xdll-paths) ;
|
||||
}
|
||||
|
||||
if $(extra)
|
||||
{
|
||||
property-set = [ $(property-set).add-raw $(extra) ] ;
|
||||
}
|
||||
|
||||
local result = [ generator.run $(project) $(name) : $(property-set)
|
||||
: $(sources) ] ;
|
||||
|
||||
local ur ;
|
||||
if $(result)
|
||||
{
|
||||
ur = [ extra-usage-requirements $(result) : $(property-set) ] ;
|
||||
ur = [ $(ur).add
|
||||
[ property-set.create <xdll-path>$(extra-xdll-paths) ] ] ;
|
||||
}
|
||||
return $(ur) $(result) ;
|
||||
}
|
||||
|
||||
rule extra-usage-requirements ( created-targets * : property-set )
|
||||
{
|
||||
local result = [ property-set.empty ] ;
|
||||
local extra ;
|
||||
|
||||
# Add appropriate <xdll-path> usage requirements.
|
||||
local raw = [ $(property-set).raw ] ;
|
||||
if <link>shared in $(raw)
|
||||
{
|
||||
local paths ;
|
||||
local pwd = [ path.pwd ] ;
|
||||
for local t in $(created-targets)
|
||||
{
|
||||
if [ type.is-derived [ $(t).type ] SHARED_LIB ]
|
||||
{
|
||||
paths += [ path.root [ path.make [ $(t).path ] ] $(pwd) ] ;
|
||||
}
|
||||
}
|
||||
extra += $(paths:G=<xdll-path>) ;
|
||||
}
|
||||
|
||||
# We need to pass <xdll-path> features that we've got from sources,
|
||||
# because if a shared library is built, exe using it needs to know paths
|
||||
# to other shared libraries this one depends on in order to be able to
|
||||
# find them all at runtime.
|
||||
|
||||
# Just pass all features in property-set, it is theoretically possible
|
||||
# that we will propagate <xdll-path> features explicitly specified by
|
||||
# the user, but then the user is to blame for using an internal feature.
|
||||
local values = [ $(property-set).get <xdll-path> ] ;
|
||||
extra += $(values:G=<xdll-path>) ;
|
||||
|
||||
if $(extra)
|
||||
{
|
||||
result = [ property-set.create $(extra) ] ;
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
rule generated-targets ( sources + : property-set : project name ? )
|
||||
{
|
||||
local sources2 ; # Sources to pass to inherited rule.
|
||||
local properties2 ; # Properties to pass to inherited rule.
|
||||
local libraries ; # Library sources.
|
||||
|
||||
# Searched libraries are not passed as arguments to the linker but via
|
||||
# some option. So, we pass them to the action using a property.
|
||||
properties2 = [ $(property-set).raw ] ;
|
||||
local fsa ;
|
||||
local fst ;
|
||||
for local s in $(sources)
|
||||
{
|
||||
if [ type.is-derived [ $(s).type ] SEARCHED_LIB ]
|
||||
{
|
||||
local name = [ $(s).name ] ;
|
||||
if [ $(s).shared ]
|
||||
{
|
||||
fsa += $(name) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
fst += $(name) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sources2 += $(s) ;
|
||||
}
|
||||
}
|
||||
properties2 += <find-shared-library>$(fsa:J=&&)
|
||||
<find-static-library>$(fst:J=&&) ;
|
||||
|
||||
return [ generator.generated-targets $(sources2)
|
||||
: [ property-set.create $(properties2) ] : $(project) $(name) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule register-linker ( id composing ? : source-types + : target-types +
|
||||
: requirements * )
|
||||
{
|
||||
generators.register [ new linking-generator $(id) $(composing)
|
||||
: $(source-types) : $(target-types) : $(requirements) ] ;
|
||||
}
|
||||
|
||||
IMPORT $(__name__) : register-linker : : generators.register-linker ;
|
||||
30
src/tools/generators/prebuilt-lib-generator.jam
Normal file
30
src/tools/generators/prebuilt-lib-generator.jam
Normal file
@@ -0,0 +1,30 @@
|
||||
# Copyright 2002-2017 Rene Rivera
|
||||
# Copyright 2002-2017 Vladimir Prus
|
||||
# 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 "class" : new ;
|
||||
import generators ;
|
||||
|
||||
class prebuilt-lib-generator : generator
|
||||
{
|
||||
rule __init__ ( * : * )
|
||||
{
|
||||
generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8)
|
||||
: $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) :
|
||||
$(17) : $(18) : $(19) ;
|
||||
}
|
||||
|
||||
rule run ( project name ? : property-set : sources * )
|
||||
{
|
||||
local f = [ $(property-set).get <file> ] ;
|
||||
return $(f) $(sources) ;
|
||||
}
|
||||
}
|
||||
|
||||
generators.register
|
||||
[ new prebuilt-lib-generator builtin.prebuilt : : LIB : <file> ] ;
|
||||
|
||||
generators.override builtin.prebuilt : builtin.lib-generator ;
|
||||
|
||||
92
src/tools/generators/searched-lib-generator.jam
Normal file
92
src/tools/generators/searched-lib-generator.jam
Normal file
@@ -0,0 +1,92 @@
|
||||
# Copyright 2002-2017 Rene Rivera
|
||||
# Copyright 2002-2017 Vladimir Prus
|
||||
# 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 "class" : new ;
|
||||
import generators ;
|
||||
|
||||
class searched-lib-generator : generator
|
||||
{
|
||||
import property-set ;
|
||||
|
||||
rule __init__ ( )
|
||||
{
|
||||
# The requirements cause the generators to be tried *only* when we are
|
||||
# building a lib target with a 'search' feature. This seems ugly --- all
|
||||
# we want is to make sure searched-lib-generator is not invoked deep
|
||||
# inside transformation search to produce intermediate targets.
|
||||
generator.__init__ searched-lib-generator : : SEARCHED_LIB ;
|
||||
}
|
||||
|
||||
rule run ( project name ? : property-set : sources * )
|
||||
{
|
||||
if $(name)
|
||||
{
|
||||
# If 'name' is empty, it means we have not been called to build a
|
||||
# top-level target. In this case, we just fail immediately, because
|
||||
# searched-lib-generator cannot be used to produce intermediate
|
||||
# targets.
|
||||
|
||||
local properties = [ $(property-set).raw ] ;
|
||||
local shared ;
|
||||
if <link>shared in $(properties)
|
||||
{
|
||||
shared = true ;
|
||||
}
|
||||
|
||||
local search = [ feature.get-values <search> : $(properties) ] ;
|
||||
|
||||
local a = [ new null-action $(property-set) ] ;
|
||||
local lib-name = [ feature.get-values <name> : $(properties) ] ;
|
||||
lib-name ?= $(name) ;
|
||||
local t = [ new searched-lib-target $(lib-name) : $(project)
|
||||
: $(shared) : $(search) : $(a) ] ;
|
||||
# We return sources for a simple reason. If there is
|
||||
# lib png : z : <name>png ;
|
||||
# the 'z' target should be returned, so that apps linking to 'png'
|
||||
# will link to 'z', too.
|
||||
return [ property-set.create <xdll-path>$(search) ]
|
||||
[ virtual-target.register $(t) ] $(sources) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
generators.register [ new searched-lib-generator ] ;
|
||||
|
||||
class searched-lib-target : abstract-file-target
|
||||
{
|
||||
rule __init__ ( name
|
||||
: project
|
||||
: shared ?
|
||||
: search *
|
||||
: action
|
||||
)
|
||||
{
|
||||
abstract-file-target.__init__ $(name) : SEARCHED_LIB : $(project)
|
||||
: $(action) : ;
|
||||
|
||||
self.shared = $(shared) ;
|
||||
self.search = $(search) ;
|
||||
}
|
||||
|
||||
rule shared ( )
|
||||
{
|
||||
return $(self.shared) ;
|
||||
}
|
||||
|
||||
rule search ( )
|
||||
{
|
||||
return $(self.search) ;
|
||||
}
|
||||
|
||||
rule actualize-location ( target )
|
||||
{
|
||||
NOTFILE $(target) ;
|
||||
}
|
||||
|
||||
rule path ( )
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -162,9 +162,6 @@ flags intel-linux.compile OPTIONS <warnings>all : -w2 ;
|
||||
|
||||
rule compile.c++ ( targets * : sources * : properties * )
|
||||
{
|
||||
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
|
||||
DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
|
||||
}
|
||||
|
||||
@@ -175,9 +172,6 @@ actions compile.c++ bind PCH_FILE
|
||||
|
||||
rule compile.c ( targets * : sources * : properties * )
|
||||
{
|
||||
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
|
||||
DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
|
||||
}
|
||||
|
||||
@@ -188,9 +182,6 @@ actions compile.c bind PCH_FILE
|
||||
|
||||
rule compile.c++.pch ( targets * : sources * : properties * )
|
||||
{
|
||||
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
|
||||
}
|
||||
#
|
||||
# Compiling a pch first deletes any existing *.pchi file, as Intel's compiler
|
||||
@@ -209,9 +200,6 @@ actions compile.fortran
|
||||
|
||||
rule compile.c.pch ( targets * : sources * : properties * )
|
||||
{
|
||||
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
|
||||
}
|
||||
|
||||
actions compile.c.pch
|
||||
@@ -221,8 +209,6 @@ actions compile.c.pch
|
||||
|
||||
rule link ( targets * : sources * : properties * )
|
||||
{
|
||||
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
|
||||
SPACE on $(targets) = " " ;
|
||||
JAM_SEMAPHORE on $(targets) = <s>intel-linux-link-semaphore ;
|
||||
}
|
||||
@@ -234,8 +220,6 @@ actions link bind LIBRARIES
|
||||
|
||||
rule link.dll ( targets * : sources * : properties * )
|
||||
{
|
||||
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
|
||||
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
|
||||
SPACE on $(targets) = " " ;
|
||||
JAM_SEMAPHORE on $(targets) = <s>intel-linux-link-semaphore ;
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ class Tester(TestCmd.TestCmd):
|
||||
def __init__(self, arguments=None, executable="bjam",
|
||||
match=TestCmd.match_exact, boost_build_path=None,
|
||||
translate_suffixes=True, pass_toolset=True, use_test_config=True,
|
||||
ignore_toolset_requirements=True, workdir="", pass_d0=True,
|
||||
ignore_toolset_requirements=False, workdir="", pass_d0=True,
|
||||
**keywords):
|
||||
|
||||
assert arguments.__class__ is not str
|
||||
@@ -352,7 +352,7 @@ class Tester(TestCmd.TestCmd):
|
||||
|
||||
def copy(self, src, dst):
|
||||
try:
|
||||
self.write(dst, self.read(src, 1))
|
||||
self.write(dst, self.read(src, binary=True))
|
||||
except:
|
||||
self.fail_test(1)
|
||||
|
||||
@@ -360,7 +360,7 @@ class Tester(TestCmd.TestCmd):
|
||||
src_name = self.native_file_name(src)
|
||||
dst_name = self.native_file_name(dst)
|
||||
stats = os.stat(src_name)
|
||||
self.write(dst, self.read(src, 1))
|
||||
self.write(dst, self.__read(src, binary=True))
|
||||
os.utime(dst_name, (stats.st_atime, stats.st_mtime))
|
||||
|
||||
def touch(self, names, wait=True):
|
||||
@@ -523,26 +523,26 @@ class Tester(TestCmd.TestCmd):
|
||||
expected_duration))
|
||||
self.fail_test(1, dump_stdio=False)
|
||||
|
||||
self.__ignore_junk()
|
||||
|
||||
def glob_file(self, name):
|
||||
name = self.adjust_name(name)
|
||||
result = None
|
||||
if hasattr(self, "difference"):
|
||||
for f in (self.difference.added_files +
|
||||
self.difference.modified_files +
|
||||
self.difference.touched_files):
|
||||
if fnmatch.fnmatch(f, name):
|
||||
result = self.native_file_name(f)
|
||||
result = self.__native_file_name(f)
|
||||
break
|
||||
if not result:
|
||||
result = glob.glob(self.native_file_name(name))
|
||||
result = glob.glob(self.__native_file_name(name))
|
||||
if result:
|
||||
result = result[0]
|
||||
return result
|
||||
|
||||
def read(self, name, binary=False):
|
||||
def __read(self, name, binary=False):
|
||||
try:
|
||||
if self.toolset:
|
||||
name = name.replace("$toolset", self.toolset + "*")
|
||||
name = self.glob_file(name)
|
||||
openMode = "r"
|
||||
if binary:
|
||||
openMode += "b"
|
||||
@@ -557,6 +557,10 @@ class Tester(TestCmd.TestCmd):
|
||||
self.fail_test(1)
|
||||
return ""
|
||||
|
||||
def read(self, name, binary=False):
|
||||
name = self.glob_file(name)
|
||||
return self.__read(name, binary=binary)
|
||||
|
||||
def read_and_strip(self, name):
|
||||
if not self.glob_file(name):
|
||||
return ""
|
||||
@@ -694,7 +698,7 @@ class Tester(TestCmd.TestCmd):
|
||||
"File %s touched, but no action was expected" % name)
|
||||
self.fail_test(1)
|
||||
|
||||
def expect_nothing_more(self):
|
||||
def __ignore_junk(self):
|
||||
# Not totally sure about this change, but I do not see a good
|
||||
# alternative.
|
||||
if windows:
|
||||
@@ -716,6 +720,10 @@ class Tester(TestCmd.TestCmd):
|
||||
# Compiled Python files created when running Python based Boost Build.
|
||||
self.ignore("*.pyc")
|
||||
|
||||
# OSX/Darwin files and dirs.
|
||||
self.ignore("*.dSYM/*")
|
||||
|
||||
def expect_nothing_more(self):
|
||||
if not self.unexpected_difference.empty():
|
||||
annotation("failure", "Unexpected changes found")
|
||||
output = StringIO.StringIO()
|
||||
@@ -727,10 +735,10 @@ class Tester(TestCmd.TestCmd):
|
||||
self.__expect_lines(self.stdout(), lines, expected)
|
||||
|
||||
def expect_content_lines(self, filename, line, expected=True):
|
||||
self.__expect_lines(self.__read_file(filename), line, expected)
|
||||
self.__expect_lines(self.read_and_strip(filename), line, expected)
|
||||
|
||||
def expect_content(self, name, content, exact=False):
|
||||
actual = self.__read_file(name, exact)
|
||||
actual = self.read(name)
|
||||
content = content.replace("$toolset", self.toolset + "*")
|
||||
|
||||
matched = False
|
||||
@@ -738,7 +746,7 @@ class Tester(TestCmd.TestCmd):
|
||||
matched = fnmatch.fnmatch(actual, content)
|
||||
else:
|
||||
def sorted_(x):
|
||||
x.sort()
|
||||
x.sort(lambda x, y: cmp(x.lower().replace("\\","/"), y.lower().replace("\\","/")))
|
||||
return x
|
||||
actual_ = map(lambda x: sorted_(x.split()), actual.splitlines())
|
||||
content_ = map(lambda x: sorted_(x.split()), content.splitlines())
|
||||
@@ -827,10 +835,15 @@ class Tester(TestCmd.TestCmd):
|
||||
r = map(self.adjust_suffix, r)
|
||||
r = map(lambda x, t=self.toolset: x.replace("$toolset", t + "*"), r)
|
||||
return r
|
||||
|
||||
def adjust_name(self, name):
|
||||
return self.adjust_names(name)[0]
|
||||
|
||||
def __native_file_name(self, name):
|
||||
return os.path.normpath(os.path.join(self.workdir, *name.split("/")))
|
||||
|
||||
def native_file_name(self, name):
|
||||
name = self.adjust_names(name)[0]
|
||||
return os.path.normpath(os.path.join(self.workdir, *name.split("/")))
|
||||
return self.__native_file_name(self.adjust_name(name))
|
||||
|
||||
def wait_for_time_change(self, path, touch):
|
||||
"""
|
||||
@@ -1061,19 +1074,6 @@ class Tester(TestCmd.TestCmd):
|
||||
return next
|
||||
index += 1
|
||||
|
||||
def __read_file(self, name, exact=False):
|
||||
name = self.adjust_names(name)[0]
|
||||
result = ""
|
||||
try:
|
||||
if exact:
|
||||
result = self.read(name)
|
||||
else:
|
||||
result = self.read_and_strip(name).replace("\\", "/")
|
||||
except (IOError, IndexError):
|
||||
print "Note: could not open file", name
|
||||
self.fail_test(1)
|
||||
return result
|
||||
|
||||
def __wait_for_time_change(self, path, touch, last_build_time):
|
||||
"""
|
||||
Wait until a newly assigned file system modification timestamp for
|
||||
|
||||
@@ -20,7 +20,7 @@ t.write("hello.cpp", "int main() {}\n")
|
||||
t.write("empty.cpp", "\n")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/hello.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.exe")
|
||||
t.rm(".")
|
||||
|
||||
# Test a contrived case in which an absolute name is used in a standalone
|
||||
@@ -53,7 +53,7 @@ alias('a', [os.path.join(pwd, 'a.cpp')])
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/a.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/a.exe")
|
||||
|
||||
# Test absolute path in target ids.
|
||||
t.rm(".")
|
||||
@@ -68,6 +68,6 @@ alias x : $(pwd)/../d1//a ;
|
||||
""")
|
||||
|
||||
t.run_build_system(subdir="d2")
|
||||
t.expect_addition("d1/bin/$toolset/debug/a.exe")
|
||||
t.expect_addition("d1/bin/$toolset/debug*/a.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -38,20 +38,20 @@ exe hello : hello.cpp src ;
|
||||
|
||||
# Check that targets to which "bin1" refers are updated, and only those.
|
||||
t.run_build_system(["bin1"])
|
||||
t.expect_addition(BoostBuild.List("bin/$toolset/debug/") * "a.exe a.obj")
|
||||
t.expect_addition(BoostBuild.List("bin/$toolset/debug*/") * "a.exe a.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
# Try again with "bin2"
|
||||
t.run_build_system(["bin2"])
|
||||
t.expect_addition(BoostBuild.List("bin/$toolset/debug/") * "b.exe b.obj")
|
||||
t.expect_addition(BoostBuild.List("bin/$toolset/debug*/") * "b.exe b.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
# Try building everything, making sure 'hello' target is created.
|
||||
t.run_build_system()
|
||||
t.expect_addition(BoostBuild.List("bin/$toolset/debug/") * \
|
||||
t.expect_addition(BoostBuild.List("bin/$toolset/debug*/") * \
|
||||
"hello.exe hello.obj")
|
||||
t.expect_addition("bin/$toolset/debug/s.obj")
|
||||
t.expect_addition(BoostBuild.List("bin/$toolset/debug/") * "c.exe c.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/s.obj")
|
||||
t.expect_addition(BoostBuild.List("bin/$toolset/debug*/") * "c.exe c.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ t.write("a.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system(["release"])
|
||||
|
||||
t.expect_addition("bin/$toolset/release/a.exe")
|
||||
t.expect_addition("bin/$toolset/release*/a.exe")
|
||||
|
||||
# Test that alternative selection works for ordinary properties, in particular
|
||||
# user-defined.
|
||||
@@ -43,10 +43,10 @@ t.write("b.cpp", "int main() {}\n")
|
||||
t.rm("bin")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/b.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/b.obj")
|
||||
|
||||
t.run_build_system(["X=on"])
|
||||
t.expect_addition("bin/$toolset/debug/X-on/a.obj")
|
||||
t.expect_addition("bin/$toolset/debug/X-on*/a.obj")
|
||||
|
||||
t.rm("bin")
|
||||
|
||||
@@ -57,7 +57,7 @@ exe a : a.cpp : <variant>debug ;
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/a.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/a.exe")
|
||||
|
||||
# Test that only properties which are in the build request matter for
|
||||
# alternative selection. IOW, alternative with <variant>release is better than
|
||||
@@ -68,7 +68,7 @@ exe a : a.cpp : <variant>release ;
|
||||
""")
|
||||
|
||||
t.run_build_system(["release"])
|
||||
t.expect_addition("bin/$toolset/release/a.exe")
|
||||
t.expect_addition("bin/$toolset/release*/a.exe")
|
||||
|
||||
# Test that free properties do not matter. We really do not want <cxxflags>
|
||||
# property in build request to affect alternative selection.
|
||||
@@ -78,8 +78,9 @@ exe a : a.cpp : <variant>release ;
|
||||
""")
|
||||
|
||||
t.rm("bin/$toolset/release/a.exe")
|
||||
t.rm("bin/$toolset/release/*/a.exe")
|
||||
t.run_build_system(["release", "define=FOO"])
|
||||
t.expect_addition("bin/$toolset/release/a.exe")
|
||||
t.expect_addition("bin/$toolset/release*/a.exe")
|
||||
|
||||
# Test that ambiguity is reported correctly.
|
||||
t.write("jamfile.jam", """\
|
||||
|
||||
@@ -31,8 +31,8 @@ t.write("src/b.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition(["build/$toolset/debug/a.exe",
|
||||
"build/src/$toolset/debug/b.exe"])
|
||||
t.expect_addition(["build/$toolset/debug*/a.exe",
|
||||
"build/src/$toolset/debug*/b.exe"])
|
||||
|
||||
# Test that building from child projects work.
|
||||
t.run_build_system(subdir='src')
|
||||
@@ -52,8 +52,8 @@ exe b : b.cpp ;
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition(["bin/$toolset/debug/a.exe",
|
||||
"src/build/$toolset/debug/b.exe"])
|
||||
t.expect_addition(["bin/$toolset/debug*/a.exe",
|
||||
"src/build/$toolset/debug*/b.exe"])
|
||||
|
||||
# Now test the '--build-dir' option.
|
||||
t.rm(".")
|
||||
@@ -74,8 +74,8 @@ t.write("sub/jamfile.jam", "exe b : b.cpp ;\n")
|
||||
t.write("sub/b.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system(["--build-dir=build"])
|
||||
t.expect_addition(["build/foo/$toolset/debug/a.exe",
|
||||
"build/foo/sub/$toolset/debug/b.exe"])
|
||||
t.expect_addition(["build/foo/$toolset/debug*/a.exe",
|
||||
"build/foo/sub/$toolset/debug*/b.exe"])
|
||||
|
||||
t.write("jamroot.jam", """\
|
||||
project foo : build-dir bin.v2 ;
|
||||
@@ -84,15 +84,15 @@ build-project sub ;
|
||||
""")
|
||||
|
||||
t.run_build_system(["--build-dir=build"])
|
||||
t.expect_addition(["build/foo/bin.v2/$toolset/debug/a.exe",
|
||||
"build/foo/bin.v2/sub/$toolset/debug/b.exe"])
|
||||
t.expect_addition(["build/foo/bin.v2/$toolset/debug*/a.exe",
|
||||
"build/foo/bin.v2/sub/$toolset/debug*/b.exe"])
|
||||
|
||||
# Try building in subdir. We expect that the entire build tree with be in
|
||||
# 'sub/build'. Today, I am not sure if this is what the user expects, but let
|
||||
# it be.
|
||||
t.rm('build')
|
||||
t.run_build_system(["--build-dir=build"], subdir="sub")
|
||||
t.expect_addition(["sub/build/foo/bin.v2/sub/$toolset/debug/b.exe"])
|
||||
t.expect_addition(["sub/build/foo/bin.v2/sub/$toolset/debug*/b.exe"])
|
||||
|
||||
t.write("jamroot.jam", """\
|
||||
project foo : build-dir %s ;
|
||||
|
||||
@@ -37,7 +37,7 @@ exe sub : hello.cpp ;
|
||||
|
||||
t.run_build_system(["sub", t.adjust_suffix("hello.obj")])
|
||||
t.expect_output_lines("*depends on itself*", False)
|
||||
t.expect_addition("sub/bin/$toolset/debug/hello.obj")
|
||||
t.expect_addition("sub/bin/$toolset/debug*/hello.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.cleanup()
|
||||
@@ -63,7 +63,7 @@ exe hello3 : hello3.cpp ;
|
||||
t.write("hello3.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system(["hello1", t.adjust_suffix("hello1.obj")])
|
||||
t.expect_addition("bin/$toolset/debug/hello1.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/hello1.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.cleanup()
|
||||
@@ -117,8 +117,8 @@ exe hello3 : hello3.cpp ;
|
||||
|
||||
t.run_build_system([t.adjust_suffix("hello1.obj"), t.adjust_suffix(
|
||||
"hello2.obj")])
|
||||
t.expect_addition("bin/$toolset/debug/hello1.obj")
|
||||
t.expect_addition("bin/$toolset/debug/hello2.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/hello1.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/hello2.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.cleanup()
|
||||
@@ -149,8 +149,8 @@ exe sub : hello.cpp ;
|
||||
|
||||
t.run_build_system([t.adjust_suffix("hello.obj")])
|
||||
t.expect_output_lines("*depends on itself*", False)
|
||||
t.expect_addition("bin/$toolset/debug/hello.obj")
|
||||
t.expect_addition("sub/bin/$toolset/debug/hello.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.obj")
|
||||
t.expect_addition("sub/bin/$toolset/debug*/hello.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -18,6 +18,6 @@ t.run_build_system()
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system(["release"])
|
||||
t.expect_addition("bin/$toolset/release/hello.exe")
|
||||
t.expect_addition("bin/$toolset/release*/hello.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -64,7 +64,7 @@ static-lib %s :
|
||||
t.write("lib/jamfile.jam", output.getvalue())
|
||||
create_sources("lib", sources)
|
||||
t.run_build_system(subdir="lib")
|
||||
built_archive = "lib/bin/$toolset/debug/%s" % name
|
||||
built_archive = "lib/bin/$toolset/debug*/%s" % name
|
||||
t.expect_addition(built_archive)
|
||||
t.copy(built_archive, name)
|
||||
t.rm("lib")
|
||||
|
||||
@@ -31,6 +31,6 @@ int foo()
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/hello.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -51,6 +51,6 @@ t.write("dummy.cpp", "// msvc needs at least one object file\n")
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/a.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/a.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -49,47 +49,47 @@ void sub3() {}
|
||||
# 'clean' should not remove files under separate jamroot.jam.
|
||||
t.run_build_system()
|
||||
t.run_build_system(["--clean"])
|
||||
t.expect_removal("bin/$toolset/debug/a.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1_2.obj")
|
||||
t.expect_removal("sub2/bin/$toolset/debug/sub2.obj")
|
||||
t.expect_nothing("sub3/bin/$toolset/debug/sub3.obj")
|
||||
t.expect_removal("bin/$toolset/debug*/a.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug*/sub1.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug*/sub1_2.obj")
|
||||
t.expect_removal("sub2/bin/$toolset/debug*/sub2.obj")
|
||||
t.expect_nothing("sub3/bin/$toolset/debug*/sub3.obj")
|
||||
|
||||
# 'clean-all' removes everything it can reach.
|
||||
t.run_build_system()
|
||||
t.run_build_system(["--clean-all"])
|
||||
t.expect_removal("bin/$toolset/debug/a.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1_2.obj")
|
||||
t.expect_removal("sub2/bin/$toolset/debug/sub2.obj")
|
||||
t.expect_nothing("sub3/bin/$toolset/debug/sub3.obj")
|
||||
t.expect_removal("bin/$toolset/debug*/a.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug*/sub1.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug*/sub1_2.obj")
|
||||
t.expect_removal("sub2/bin/$toolset/debug*/sub2.obj")
|
||||
t.expect_nothing("sub3/bin/$toolset/debug*/sub3.obj")
|
||||
|
||||
# 'clean' together with project target removes only under that project.
|
||||
t.run_build_system()
|
||||
t.run_build_system(["sub1", "--clean"])
|
||||
t.expect_nothing("bin/$toolset/debug/a.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1_2.obj")
|
||||
t.expect_nothing("sub2/bin/$toolset/debug/sub2.obj")
|
||||
t.expect_nothing("sub3/bin/$toolset/debug/sub3.obj")
|
||||
t.expect_nothing("bin/$toolset/debug*/a.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug*/sub1.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug*/sub1_2.obj")
|
||||
t.expect_nothing("sub2/bin/$toolset/debug*/sub2.obj")
|
||||
t.expect_nothing("sub3/bin/$toolset/debug*/sub3.obj")
|
||||
|
||||
# 'clean-all' removes everything.
|
||||
t.run_build_system()
|
||||
t.run_build_system(["sub1", "--clean-all"])
|
||||
t.expect_nothing("bin/$toolset/debug/a.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1_2.obj")
|
||||
t.expect_removal("sub2/bin/$toolset/debug/sub2.obj")
|
||||
t.expect_nothing("sub3/bin/$toolset/debug/sub3.obj")
|
||||
t.expect_nothing("bin/$toolset/debug*/a.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug*/sub1.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug*/sub1_2.obj")
|
||||
t.expect_removal("sub2/bin/$toolset/debug*/sub2.obj")
|
||||
t.expect_nothing("sub3/bin/$toolset/debug*/sub3.obj")
|
||||
|
||||
# If main target is explicitly named, we should not remove files from other
|
||||
# targets.
|
||||
t.run_build_system()
|
||||
t.run_build_system(["sub1//sub1", "--clean"])
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1.obj")
|
||||
t.expect_nothing("sub1/bin/$toolset/debug/sub1_2.obj")
|
||||
t.expect_nothing("sub2/bin/$toolset/debug/sub2.obj")
|
||||
t.expect_nothing("sub3/bin/$toolset/debug/sub3.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug*/sub1.obj")
|
||||
t.expect_nothing("sub1/bin/$toolset/debug*/sub1_2.obj")
|
||||
t.expect_nothing("sub2/bin/$toolset/debug*/sub2.obj")
|
||||
t.expect_nothing("sub3/bin/$toolset/debug*/sub3.obj")
|
||||
|
||||
# Regression test: sources of the 'cast' rule were mistakenly deleted.
|
||||
t.rm(".")
|
||||
|
||||
@@ -20,6 +20,6 @@ int main() {}
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition("bin/$toolset/release/hello.exe")
|
||||
t.expect_addition("bin/$toolset/release*/hello.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -23,7 +23,7 @@ int main() {}
|
||||
# Test conditionals in target requirements.
|
||||
t.write("jamroot.jam", "exe a : a.cpp : <link>static:<define>STATIC ;")
|
||||
t.run_build_system(["link=static"])
|
||||
t.expect_addition("bin/$toolset/debug/link-static/a.exe")
|
||||
t.expect_addition("bin/$toolset/debug/link-static*/a.exe")
|
||||
t.rm("bin")
|
||||
|
||||
# Test conditionals in project requirements.
|
||||
@@ -32,7 +32,7 @@ project : requirements <link>static:<define>STATIC ;
|
||||
exe a : a.cpp ;
|
||||
""")
|
||||
t.run_build_system(["link=static"])
|
||||
t.expect_addition("bin/$toolset/debug/link-static/a.exe")
|
||||
t.expect_addition("bin/$toolset/debug/link-static*/a.exe")
|
||||
t.rm("bin")
|
||||
|
||||
# Regression test for a bug found by Ali Azarbayejani. Conditionals inside
|
||||
@@ -43,6 +43,6 @@ exe a : a.cpp l ;
|
||||
""")
|
||||
t.write("l.cpp", "int i;")
|
||||
t.run_build_system(["link=static"])
|
||||
t.expect_addition("bin/$toolset/debug/link-static/a.exe")
|
||||
t.expect_addition("bin/$toolset/debug/link-static*/a.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -25,6 +25,6 @@ int main()
|
||||
""")
|
||||
|
||||
t.run_build_system(stdout=None, stderr=None)
|
||||
t.expect_addition("bin/$toolset/debug/hello.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -50,13 +50,13 @@ install test2i : test2 : <dependency>test1 ;
|
||||
""")
|
||||
|
||||
tester.run_build_system()
|
||||
tester.expect_addition("bin/$toolset/debug/test2.obj")
|
||||
tester.expect_addition("bin/$toolset/debug/test1.obj")
|
||||
tester.expect_addition("bin/$toolset/debug*/test2.obj")
|
||||
tester.expect_addition("bin/$toolset/debug*/test1.obj")
|
||||
tester.expect_addition("test2i/test2.obj")
|
||||
tester.expect_nothing_more()
|
||||
|
||||
test2src = tester.read("test2i/test2.obj")
|
||||
test2dest = tester.read("bin/$toolset/debug/test2.obj")
|
||||
test2dest = tester.read("bin/$toolset/debug*/test2.obj")
|
||||
if test2src != test2dest:
|
||||
BoostBuild.annotation("failure", "The object file was not copied "
|
||||
"correctly")
|
||||
|
||||
@@ -61,6 +61,6 @@ t.write("r.rcc", """
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_content("bin/$toolset/debug/r.obj", "rc-object")
|
||||
t.expect_content("bin/$toolset/debug*/r.obj", "rc-object")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -16,20 +16,20 @@ t.write("jamfile.jam", "exe a : a.cpp : : debug release ;")
|
||||
t.write("a.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/a.exe")
|
||||
t.expect_addition("bin/$toolset/release/a.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/a.exe")
|
||||
t.expect_addition("bin/$toolset/release*/a.exe")
|
||||
|
||||
# Check that explictly-specified build variant suppresses default-build.
|
||||
t.rm("bin")
|
||||
t.run_build_system(["release"])
|
||||
t.expect_addition(BoostBuild.List("bin/$toolset/release/") * "a.exe a.obj")
|
||||
t.expect_addition(BoostBuild.List("bin/$toolset/release*/") * "a.exe a.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
# Now check that we can specify explicit build request and default-build will be
|
||||
# combined with it.
|
||||
t.run_build_system(["optimization=space"])
|
||||
t.expect_addition("bin/$toolset/debug/optimization-space/a.exe")
|
||||
t.expect_addition("bin/$toolset/release/optimization-space/a.exe")
|
||||
t.expect_addition("bin/$toolset/debug/optimization-space*/a.exe")
|
||||
t.expect_addition("bin/$toolset/release/optimization-space*/a.exe")
|
||||
|
||||
# Test that default-build must be identical in all alternatives. Error case.
|
||||
t.write("jamfile.jam", """\
|
||||
|
||||
@@ -45,6 +45,6 @@ void foo() {}
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/hello.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -144,7 +144,7 @@ get_manager().engine().register_action("foo.foo",
|
||||
# Check that main target 'c' was able to find 'x.h' from 'a's dependency
|
||||
# graph.
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/c.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/c.exe")
|
||||
|
||||
# Check handling of first level includes.
|
||||
|
||||
@@ -152,35 +152,35 @@ get_manager().engine().register_action("foo.foo",
|
||||
t.touch("a.h")
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_touch("bin/$toolset/debug/a.exe")
|
||||
t.expect_touch("bin/$toolset/debug/a.obj")
|
||||
t.expect_touch("bin/$toolset/debug/a_c.obj")
|
||||
t.expect_touch("bin/$toolset/debug/b.exe")
|
||||
t.expect_touch("bin/$toolset/debug/b.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/a.exe")
|
||||
t.expect_touch("bin/$toolset/debug*/a.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/a_c.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/b.exe")
|
||||
t.expect_touch("bin/$toolset/debug*/b.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
# Only source files using include <a.h> should be compiled.
|
||||
t.touch("src1/a.h")
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_touch("bin/$toolset/debug/a.exe")
|
||||
t.expect_touch("bin/$toolset/debug/a.obj")
|
||||
t.expect_touch("bin/$toolset/debug/a_c.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/a.exe")
|
||||
t.expect_touch("bin/$toolset/debug*/a.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/a_c.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
# "src/a.h" includes "b.h" (in the same dir).
|
||||
t.touch("src1/b.h")
|
||||
t.run_build_system()
|
||||
t.expect_touch("bin/$toolset/debug/a.exe")
|
||||
t.expect_touch("bin/$toolset/debug/a.obj")
|
||||
t.expect_touch("bin/$toolset/debug/a_c.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/a.exe")
|
||||
t.expect_touch("bin/$toolset/debug*/a.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/a_c.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
# Included by "src/b.h". We had a bug: file included using double quotes
|
||||
# (e.g. "b.h") was not scanned at all in this case.
|
||||
t.touch("src1/c.h")
|
||||
t.run_build_system()
|
||||
t.expect_touch("bin/$toolset/debug/a.exe")
|
||||
t.expect_touch("bin/$toolset/debug*/a.exe")
|
||||
|
||||
t.touch("b.h")
|
||||
t.run_build_system()
|
||||
@@ -193,14 +193,14 @@ get_manager().engine().register_action("foo.foo",
|
||||
# this check will be implemented later.
|
||||
t.touch("x.foo")
|
||||
t.run_build_system()
|
||||
t.expect_touch("bin/$toolset/debug/a.obj")
|
||||
t.expect_touch("bin/$toolset/debug/a_c.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/a.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/a_c.obj")
|
||||
|
||||
# Check that generated headers are scanned for dependencies as well.
|
||||
t.touch("src1/z.h")
|
||||
t.run_build_system()
|
||||
t.expect_touch("bin/$toolset/debug/a.obj")
|
||||
t.expect_touch("bin/$toolset/debug/a_c.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/a.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/a_c.obj")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -226,11 +226,11 @@ int main() {}
|
||||
t.write("include/dir/header.h", "\n")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/main.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/main.obj")
|
||||
|
||||
t.touch("include/dir/header.h")
|
||||
t.run_build_system()
|
||||
t.expect_touch("bin/$toolset/debug/main.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/main.obj")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
|
||||
@@ -36,14 +36,14 @@ int __declspec(dllexport) force_implib_creation;
|
||||
""")
|
||||
|
||||
t.run_build_system(["define=MACROS"])
|
||||
t.expect_addition("bin/$toolset/debug/"
|
||||
t.expect_addition("bin/$toolset/debug*/"
|
||||
* (BoostBuild.List("a.obj b.obj b.dll a.exe")))
|
||||
|
||||
|
||||
# When building a debug version, the 'define' still applies.
|
||||
t.rm("bin")
|
||||
t.run_build_system(["debug", "define=MACROS"])
|
||||
t.expect_addition("bin/$toolset/debug/"
|
||||
t.expect_addition("bin/$toolset/debug*/"
|
||||
* (BoostBuild.List("a.obj b.obj b.dll a.exe")))
|
||||
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ int main() {}
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/hello.exe")
|
||||
t.expect_addition("bin/$toolset/debug/hello.obj")
|
||||
t.expect_addition("bin/$toolset/release/hello.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.obj")
|
||||
t.expect_addition("bin/$toolset/release*/hello.obj")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -135,12 +135,12 @@ bar() {}
|
||||
|
||||
t.run_build_system(["hardcode-dll-paths=true"])
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/mp.pathlist")
|
||||
t.expect_addition("bin/$toolset/debug*/mp.pathlist")
|
||||
|
||||
es1 = t.adjust_names("a/bin/$toolset/debug")[0]
|
||||
es2 = t.adjust_names("b/bin/$toolset/debug")[0]
|
||||
es1 = t.adjust_name("a/bin/$toolset/debug*")
|
||||
es2 = t.adjust_name("b/bin/$toolset/debug*")
|
||||
|
||||
t.expect_content_lines("bin/$toolset/debug/mp.pathlist", "*" + es1);
|
||||
t.expect_content_lines("bin/$toolset/debug/mp.pathlist", "*" + es2);
|
||||
t.expect_content_lines("bin/$toolset/debug*/mp.pathlist", "*" + es1);
|
||||
t.expect_content_lines("bin/$toolset/debug*/mp.pathlist", "*" + es2);
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -15,7 +15,7 @@ t.set_tree("../example/customization")
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition(["bin/$toolset/debug/codegen.exe",
|
||||
"bin/$toolset/debug/usage.cpp"])
|
||||
t.expect_addition(["bin/$toolset/debug*/codegen.exe",
|
||||
"bin/$toolset/debug*/usage.cpp"])
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -17,10 +17,10 @@ t.set_tree("../example/gettext")
|
||||
|
||||
t.run_build_system(stderr=None)
|
||||
|
||||
t.expect_addition(["bin/$toolset/debug/main.exe",
|
||||
"bin/$toolset/debug/russian.mo"])
|
||||
t.expect_addition(["bin/$toolset/debug*/main.exe",
|
||||
"bin/$toolset/debug*/russian.mo"])
|
||||
|
||||
file = t.adjust_names(["bin/$toolset/debug/main.exe"])[0]
|
||||
file = t.adjust_names(["bin/$toolset/debug*/main.exe"])[0]
|
||||
|
||||
input_fd = os.popen(file)
|
||||
input = input_fd.read();
|
||||
|
||||
@@ -15,7 +15,7 @@ t.set_tree("../example/libraries")
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition(["app/bin/$toolset/debug/app.exe",
|
||||
"util/foo/bin/$toolset/debug/bar.dll"])
|
||||
t.expect_addition(["app/bin/$toolset/debug*/app.exe",
|
||||
"util/foo/bin/$toolset/debug*/bar.dll"])
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -13,5 +13,5 @@ import sys
|
||||
t = BoostBuild.Tester(['example.python.interpreter=%s' % sys.executable])
|
||||
t.set_tree("../example/make")
|
||||
t.run_build_system()
|
||||
t.expect_addition(["bin/$toolset/debug/main.cpp"])
|
||||
t.expect_addition(["bin/$toolset/debug*/main.cpp"])
|
||||
t.cleanup()
|
||||
|
||||
@@ -13,14 +13,14 @@ t = BoostBuild.Tester()
|
||||
|
||||
t.set_tree("../example/qt/qt4/hello")
|
||||
t.run_build_system()
|
||||
t.expect_addition(["bin/$toolset/debug/threading-multi/arrow"])
|
||||
t.expect_addition(["bin/$toolset/debug*/threading-multi/arrow"])
|
||||
|
||||
t.set_tree("../example/qt/qt4/moccable-cpp")
|
||||
t.run_build_system()
|
||||
t.expect_addition(["bin/$toolset/debug/threading-multi/main"])
|
||||
t.expect_addition(["bin/$toolset/debug*/threading-multi/main"])
|
||||
|
||||
t.set_tree("../example/qt/qt4/uic")
|
||||
t.run_build_system()
|
||||
t.expect_addition(["bin/$toolset/debug/threading-multi/hello"])
|
||||
t.expect_addition(["bin/$toolset/debug*/threading-multi/hello"])
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -51,9 +51,9 @@ feature.compose <cf-on:version>1 : <define>CF_1 ;
|
||||
t.expand_toolset("jamfile.jam")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition(["bin/$toolset/debug/a.exe",
|
||||
"bin/$toolset/debug/b.exe",
|
||||
"bin/$toolset/release/c.exe"])
|
||||
t.expect_addition(["bin/$toolset/debug*/a.exe",
|
||||
"bin/$toolset/debug*/b.exe",
|
||||
"bin/$toolset/release*/c.exe"])
|
||||
|
||||
t.rm("bin")
|
||||
|
||||
@@ -75,6 +75,6 @@ t.write("foo/header.h", "\n")
|
||||
t.write("jamroot.jam", "")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/test.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/test.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -18,12 +18,12 @@ t.write("hello.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system()
|
||||
t.ignore("*.tds")
|
||||
t.expect_addition(BoostBuild.List("bin/$toolset/debug/hello") * \
|
||||
t.expect_addition(BoostBuild.List("bin/$toolset/debug*/hello") * \
|
||||
[".exe", ".obj"])
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system(["hello2"])
|
||||
t.expect_addition("bin/$toolset/debug/hello2.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/hello2.exe")
|
||||
|
||||
t.rm(".")
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ t.write("test.c", """
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/test-cpp.obj")
|
||||
t.expect_addition("bin/$toolset/debug/test-c.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/test-cpp.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/test-c.obj")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -37,6 +37,6 @@ void foo() {}
|
||||
# error at this point.
|
||||
t.run_build_system(["hello", "define=FOO"])
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/hello.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -20,7 +20,7 @@ t.expect_output_lines("warning: On gcc, DLLs can not be built with "
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system(["link=static", "runtime-link=static"])
|
||||
binFolder = "bin/$toolset/debug/link-static/runtime-link-static"
|
||||
binFolder = "bin/$toolset/debug*/link-static/runtime-link-static"
|
||||
t.expect_addition("%s/hello.obj" % binFolder)
|
||||
t.expect_addition("%s/hello.lib" % binFolder)
|
||||
t.expect_nothing_more()
|
||||
|
||||
@@ -87,9 +87,9 @@ my-obj other-obj : source.extension ;
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_output_lines("Generating a CPP file...")
|
||||
t.expect_addition("bin/$toolset/debug/dummy.my_obj")
|
||||
t.expect_addition("Other/bin/$toolset/debug/other-obj.cpp")
|
||||
t.expect_addition("Other/bin/$toolset/debug/other-obj.my_obj")
|
||||
t.expect_addition("bin/$toolset/debug*/dummy.my_obj")
|
||||
t.expect_addition("Other/bin/$toolset/debug*/other-obj.cpp")
|
||||
t.expect_addition("Other/bin/$toolset/debug*/other-obj.my_obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.cleanup()
|
||||
@@ -139,8 +139,8 @@ yyy other : source.xxx2 ;
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/dummy.yyy")
|
||||
t.expect_addition("Other/bin/$toolset/debug/other.yyy")
|
||||
t.expect_addition("bin/$toolset/debug*/dummy.yyy")
|
||||
t.expect_addition("Other/bin/$toolset/debug*/other.yyy")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -215,17 +215,17 @@ nm-exe e : e.cpp ;
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/" * BoostBuild.List("a.my_exe "
|
||||
t.expect_addition("bin/$toolset/debug*/" * BoostBuild.List("a.my_exe "
|
||||
"a.my_obj b.my_obj c.tui_h c.cpp c.my_obj d_parser.whl d_lexer.dlp "
|
||||
"d_parser.cpp d_lexer.cpp d_lexer.my_obj d_parser.lr0 d_parser.h "
|
||||
"d_parser.my_obj d_parser_symbols.h x.c x.my_obj y.x1 y.x2 y.cpp "
|
||||
"y.my_obj e.marked_cpp e.positions e.target_cpp e.my_obj e.my_exe "
|
||||
"f.my_exe obj_1.my_obj obj_2.my_obj"))
|
||||
t.expect_addition("lib/bin/$toolset/debug/" * BoostBuild.List("c.my_obj "
|
||||
t.expect_addition("lib/bin/$toolset/debug*/" * BoostBuild.List("c.my_obj "
|
||||
"auxilliary.my_lib"))
|
||||
t.expect_nothing_more()
|
||||
|
||||
folder = "bin/$toolset/debug"
|
||||
folder = "bin/$toolset/debug*"
|
||||
t.expect_content_lines("%s/obj_1.my_obj" % folder, " Sources: 'z.cpp'")
|
||||
t.expect_content_lines("%s/obj_2.my_obj" % folder, " Sources: 'z.cpp'")
|
||||
t.expect_content_lines("%s/a.my_obj" % folder, " Sources: 'a.cpp'")
|
||||
@@ -311,7 +311,7 @@ ddd _xxx : _xxx._a ;
|
||||
def suffix(rename):
|
||||
if rename: return "_x"
|
||||
return ""
|
||||
name = "bin/$toolset/debug/_xxx"
|
||||
name = "bin/$toolset/debug*/_xxx"
|
||||
e = t.expect_addition
|
||||
e("%s%s._b1" % (name, suffix(rename1)))
|
||||
e("%s%s._b2" % (name, suffix(rename2)))
|
||||
|
||||
@@ -43,7 +43,7 @@ int main() { return i; }
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/hello.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.exe")
|
||||
|
||||
t.rm("bin")
|
||||
|
||||
@@ -76,6 +76,6 @@ int main() { return i; }
|
||||
""")
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/hello.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -55,9 +55,9 @@ rule a3-rule-2 ( properties * )
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/a1.exe")
|
||||
t.expect_addition("bin/$toolset/debug/optimization-speed/a2.exe")
|
||||
t.expect_addition("bin/$toolset/debug/optimization-speed/a3.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/a1.exe")
|
||||
t.expect_addition("bin/$toolset/debug/optimization-speed*/a2.exe")
|
||||
t.expect_addition("bin/$toolset/debug/optimization-speed*/a3.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
|
||||
@@ -40,8 +40,8 @@ exe test1 : test1.cpp ;
|
||||
|
||||
tester.run_build_system()
|
||||
|
||||
tester.expect_addition("bin/$toolset/debug/test.obj")
|
||||
tester.expect_addition("a/bin/$toolset/debug/test1.exe")
|
||||
tester.expect_addition("bin/$toolset/debug*/test.obj")
|
||||
tester.expect_addition("a/bin/$toolset/debug*/test1.exe")
|
||||
|
||||
tester.rm("bin")
|
||||
tester.rm("a/bin")
|
||||
@@ -55,8 +55,8 @@ tester.rm("a/bin")
|
||||
|
||||
tester.run_build_system(subdir="a")
|
||||
|
||||
tester.expect_addition("bin/$toolset/debug/test.obj")
|
||||
tester.expect_addition("a/bin/$toolset/debug/test1.exe")
|
||||
tester.expect_addition("bin/$toolset/debug*/test.obj")
|
||||
tester.expect_addition("a/bin/$toolset/debug*/test1.exe")
|
||||
|
||||
tester.rm("bin")
|
||||
tester.rm("a/bin")
|
||||
@@ -76,8 +76,8 @@ build-project a ;
|
||||
|
||||
tester.run_build_system()
|
||||
|
||||
tester.expect_addition("bin/$toolset/debug/test.obj")
|
||||
tester.expect_addition("a/bin/$toolset/debug/test1.exe")
|
||||
tester.expect_addition("bin/$toolset/debug*/test.obj")
|
||||
tester.expect_addition("a/bin/$toolset/debug*/test1.exe")
|
||||
|
||||
tester.rm("bin")
|
||||
tester.rm("a/bin")
|
||||
@@ -97,8 +97,8 @@ build-project a ;
|
||||
|
||||
tester.run_build_system()
|
||||
|
||||
tester.expect_addition("bin/$toolset/debug/test.obj")
|
||||
tester.expect_addition("a/bin/$toolset/debug/test1.exe")
|
||||
tester.expect_addition("bin/$toolset/debug*/test.obj")
|
||||
tester.expect_addition("a/bin/$toolset/debug*/test1.exe")
|
||||
|
||||
tester.rm("bin")
|
||||
tester.rm("a/bin")
|
||||
@@ -118,8 +118,8 @@ build-project a ;
|
||||
|
||||
tester.run_build_system()
|
||||
|
||||
tester.expect_addition("bin/$toolset/debug/test.obj")
|
||||
tester.expect_addition("a/bin/$toolset/debug/test1.exe")
|
||||
tester.expect_addition("bin/$toolset/debug*/test.obj")
|
||||
tester.expect_addition("a/bin/$toolset/debug*/test1.exe")
|
||||
|
||||
tester.rm("bin")
|
||||
tester.rm("a/bin")
|
||||
@@ -141,7 +141,7 @@ exe test : test.cpp ;
|
||||
""")
|
||||
|
||||
tester.run_build_system()
|
||||
tester.expect_addition("bin/$toolset/debug/test.exe")
|
||||
tester.expect_addition("bin/$toolset/debug*/test.exe")
|
||||
|
||||
tester.rm("bin")
|
||||
tester.rm("a/bin")
|
||||
@@ -162,7 +162,7 @@ exe test : test.cpp ;
|
||||
""")
|
||||
|
||||
tester.run_build_system()
|
||||
tester.expect_addition("bin/$toolset/debug/test.exe")
|
||||
tester.expect_addition("bin/$toolset/debug*/test.exe")
|
||||
|
||||
tester.rm("bin")
|
||||
tester.rm("a/bin")
|
||||
@@ -200,8 +200,8 @@ int main() { bar(); }
|
||||
""")
|
||||
|
||||
tester.run_build_system()
|
||||
tester.expect_addition("b/bin/$toolset/debug/test3.obj")
|
||||
tester.expect_addition("a/bin/$toolset/debug/test.exe")
|
||||
tester.expect_addition("b/bin/$toolset/debug*/test3.obj")
|
||||
tester.expect_addition("a/bin/$toolset/debug*/test.exe")
|
||||
|
||||
tester.rm("bin")
|
||||
tester.rm("a")
|
||||
@@ -232,6 +232,6 @@ tester.write("a_src/test1.cpp", """
|
||||
""")
|
||||
|
||||
tester.run_build_system(subdir="build/a")
|
||||
tester.expect_addition("build/a/bin/$toolset/debug/test.exe")
|
||||
tester.expect_addition("build/a/bin/$toolset/debug*/test.exe")
|
||||
|
||||
tester.cleanup()
|
||||
|
||||
@@ -21,11 +21,12 @@ int main() {}
|
||||
t.write("helper.cpp", "void helper() {}\n")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/link-static/a__helper.lib")
|
||||
t.expect_addition("bin/$toolset/debug/link-static*/a__helper.lib")
|
||||
t.rm("bin/$toolset/debug/link-static/a__helper.lib")
|
||||
t.rm("bin/$toolset/debug/link-static/*/a__helper.lib")
|
||||
|
||||
t.run_build_system(["a__helper"])
|
||||
t.expect_addition("bin/$toolset/debug/link-static/a__helper.lib")
|
||||
t.expect_addition("bin/$toolset/debug/link-static*/a__helper.lib")
|
||||
|
||||
t.rm("bin")
|
||||
|
||||
@@ -39,9 +40,9 @@ exe a2 : a.cpp [ lib helper : helper.cpp ] ;
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/link-static/a.exe")
|
||||
t.expect_addition("bin/$toolset/debug/link-static/a__helper.lib")
|
||||
t.expect_addition("bin/$toolset/debug/link-static/a2__helper.lib")
|
||||
t.expect_addition("bin/$toolset/debug/link-static*/a.exe")
|
||||
t.expect_addition("bin/$toolset/debug/link-static*/a__helper.lib")
|
||||
t.expect_addition("bin/$toolset/debug/link-static*/a2__helper.lib")
|
||||
|
||||
|
||||
# Check that the 'alias' target does not change the name of inline targets, and
|
||||
@@ -57,6 +58,6 @@ t.run_build_system()
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system(["a"])
|
||||
t.expect_addition("bin/$toolset/debug/link-static/helper.lib")
|
||||
t.expect_addition("bin/$toolset/debug/link-static*/helper.lib")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -25,7 +25,7 @@ void foo() {}
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/a.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/a.obj")
|
||||
|
||||
t.rm("bin")
|
||||
|
||||
@@ -40,6 +40,6 @@ lib a : : <conditional>@test ;
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/a.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/a.obj")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -54,11 +54,11 @@ foo() { geek(); }
|
||||
t.write("b/jamfile.jam", "lib b : b.cpp ../a//a ;")
|
||||
|
||||
t.run_build_system(["-d2"], stderr=None)
|
||||
t.expect_addition("bin/$toolset/debug/main.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/main.exe")
|
||||
t.rm(["bin", "a/bin", "b/bin"])
|
||||
|
||||
t.run_build_system(["link=static"])
|
||||
t.expect_addition("bin/$toolset/debug/link-static/main.exe")
|
||||
t.expect_addition("bin/$toolset/debug/link-static*/main.exe")
|
||||
t.rm(["bin", "a/bin", "b/bin"])
|
||||
|
||||
|
||||
@@ -66,14 +66,14 @@ t.rm(["bin", "a/bin", "b/bin"])
|
||||
t.write("b/jamfile.jam", "lib b : b.cpp : <library>../a//a ;")
|
||||
|
||||
t.run_build_system(["link=static"])
|
||||
t.expect_addition("bin/$toolset/debug/link-static/main.exe")
|
||||
t.expect_addition("bin/$toolset/debug/link-static*/main.exe")
|
||||
|
||||
t.rm(["bin", "a/bin", "b/bin"])
|
||||
|
||||
t.write("b/jamfile.jam", "lib b : b.cpp ../a//a/<link>shared : <link>static ;")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/main.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/main.exe")
|
||||
|
||||
t.rm(["bin", "a/bin", "b/bin"])
|
||||
|
||||
@@ -88,7 +88,7 @@ lib z : : <name>zzz ;
|
||||
t.run_build_system(["-a", "-d+2"], status=None, stderr=None)
|
||||
# Try to find the "zzz" string either in response file (for Windows compilers),
|
||||
# or in the standard output.
|
||||
rsp = t.adjust_names("bin/$toolset/debug/main.exe.rsp")[0]
|
||||
rsp = t.adjust_names("bin/$toolset/debug*/main.exe.rsp")[0]
|
||||
if os.path.exists(rsp) and ( string.find(open(rsp).read(), "zzz") != -1 ):
|
||||
pass
|
||||
elif string.find(t.stdout(), "zzz") != -1:
|
||||
@@ -147,6 +147,6 @@ int main() { b(); }
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/main.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/main.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -47,7 +47,7 @@ lib liba : a.cpp : <use>libb ;
|
||||
""")
|
||||
|
||||
t.run_build_system(["-d2"])
|
||||
t.expect_addition("bin/$toolset/debug/main.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/main.exe")
|
||||
|
||||
|
||||
# Test the order between searched libraries.
|
||||
|
||||
@@ -50,7 +50,7 @@ t.write("lib/jamroot.jam", """
|
||||
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/a.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/a.exe")
|
||||
t.expect_nothing("lib/bin/$toolset/release/x.obj")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -215,7 +215,7 @@ def test_include_scan():
|
||||
|
||||
t.run_build_system(["test"])
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/test.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/test.obj")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_nothing_more()
|
||||
@@ -248,7 +248,7 @@ def test_include_scan_merge_existing():
|
||||
|
||||
t.run_build_system(["test"])
|
||||
t.expect_addition("include/file1.h")
|
||||
t.expect_addition("bin/$toolset/debug/test.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/test.obj")
|
||||
t.ignore_touch("include/file2.h")
|
||||
t.expect_nothing_more()
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ footer = """
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/FILL_SOME_HERE.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/FILL_SOME_HERE.exe")
|
||||
|
||||
t.cleanup()
|
||||
"""
|
||||
|
||||
@@ -32,7 +32,7 @@ int main() {}
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition("child/bin/$toolset/debug/main.exe")
|
||||
t.expect_addition("child/bin/$toolset/debug*/main.exe")
|
||||
t.fail_test(t.stdout().find("Setting child requirements") < t.stdout().find(
|
||||
"Setting parent requirements"))
|
||||
|
||||
@@ -49,7 +49,7 @@ int main() {}
|
||||
""")
|
||||
|
||||
t.run_build_system(subdir="src/app")
|
||||
t.expect_addition("src/app/bin/$toolset/debug/test.exe")
|
||||
t.expect_addition("src/app/bin/$toolset/debug*/test.exe")
|
||||
|
||||
|
||||
# child/child2 used to be loaded before child
|
||||
|
||||
@@ -28,8 +28,8 @@ make foo.bar : : creator : <test_feature>12345678 ;
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/foo.bar")
|
||||
t.fail_test(string.find(t.read("bin/$toolset/debug/foo.bar"), "12345678") == -1)
|
||||
t.expect_addition("bin/$toolset/debug*/foo.bar")
|
||||
t.fail_test(string.find(t.read("bin/$toolset/debug*/foo.bar"), "12345678") == -1)
|
||||
|
||||
|
||||
# Regression test. Make sure that if a main target is requested two times, and
|
||||
|
||||
@@ -32,7 +32,7 @@ t.write("test.cpp", """
|
||||
t.run_build_system(["test"], stdout="""Hello World!
|
||||
""")
|
||||
|
||||
t.expect_addition("bin/$toolset/link-static/test.obj")
|
||||
t.expect_addition("bin/$toolset/link-static*/test.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -29,7 +29,7 @@ t.run_build_system(["-n", "-d+2"])
|
||||
|
||||
t.fail_test(t.stdout().find("echo hi") == -1)
|
||||
|
||||
name = t.adjust_names("bin/$toolset/debug/hello.exe")[0]
|
||||
name = t.adjust_names("bin/$toolset/debug*/hello.exe")[0]
|
||||
name = apply(os.path.join, name.split("/"));
|
||||
t.expect_output_lines(" valgrind *%s " % name)
|
||||
|
||||
|
||||
@@ -32,12 +32,12 @@ def test_default_order():
|
||||
|
||||
tester.run_build_system()
|
||||
|
||||
tester.expect_addition("bin/$toolset/debug/test.obj")
|
||||
tester.expect_addition("bin/$toolset/debug*/test.obj")
|
||||
|
||||
# Check that the dependencies are correct
|
||||
tester.touch("a/test.hpp")
|
||||
tester.run_build_system()
|
||||
tester.expect_touch("bin/$toolset/debug/test.obj")
|
||||
tester.expect_touch("bin/$toolset/debug*/test.obj")
|
||||
tester.expect_nothing_more()
|
||||
|
||||
tester.touch("b/test.hpp")
|
||||
@@ -70,12 +70,12 @@ def test_default_order_mixed():
|
||||
|
||||
tester.run_build_system()
|
||||
|
||||
tester.expect_addition("bin/$toolset/debug/test.obj")
|
||||
tester.expect_addition("bin/$toolset/debug*/test.obj")
|
||||
|
||||
# Check that the dependencies are correct
|
||||
tester.touch("a/test.hpp")
|
||||
tester.run_build_system()
|
||||
tester.expect_touch("bin/$toolset/debug/test.obj")
|
||||
tester.expect_touch("bin/$toolset/debug*/test.obj")
|
||||
tester.expect_nothing_more()
|
||||
|
||||
tester.touch("b/test.hpp")
|
||||
@@ -104,16 +104,16 @@ def test_basic():
|
||||
|
||||
tester.run_build_system()
|
||||
|
||||
tester.expect_addition("bin/$toolset/debug/test.obj")
|
||||
tester.expect_addition("bin/$toolset/debug*/test.obj")
|
||||
|
||||
# Check that the dependencies are correct
|
||||
tester.touch("a/test1.hpp")
|
||||
tester.run_build_system()
|
||||
tester.expect_touch("bin/$toolset/debug/test.obj")
|
||||
tester.expect_touch("bin/$toolset/debug*/test.obj")
|
||||
|
||||
tester.touch("b/test2.hpp")
|
||||
tester.run_build_system()
|
||||
tester.expect_touch("bin/$toolset/debug/test.obj")
|
||||
tester.expect_touch("bin/$toolset/debug*/test.obj")
|
||||
|
||||
tester.cleanup()
|
||||
|
||||
@@ -135,7 +135,7 @@ def test_order1():
|
||||
|
||||
t.touch("a/test.h")
|
||||
t.run_build_system()
|
||||
t.expect_touch("bin/$toolset/debug/test.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/test.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.touch("b/test.h")
|
||||
@@ -166,7 +166,7 @@ def test_order2():
|
||||
|
||||
t.touch("b/test.h")
|
||||
t.run_build_system()
|
||||
t.expect_touch("bin/$toolset/debug/test.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/test.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.cleanup()
|
||||
@@ -203,11 +203,11 @@ def test_order_graph():
|
||||
t.write("d/test4.h", "#error should find b/test4.h\n")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/test.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/test.obj")
|
||||
|
||||
t.touch("b/test1.h")
|
||||
t.run_build_system()
|
||||
t.expect_touch("bin/$toolset/debug/test.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/test.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.touch("a/test1.h")
|
||||
@@ -216,7 +216,7 @@ def test_order_graph():
|
||||
|
||||
t.touch("c/test2.h")
|
||||
t.run_build_system()
|
||||
t.expect_touch("bin/$toolset/debug/test.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/test.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.touch("b/test2.h")
|
||||
@@ -225,7 +225,7 @@ def test_order_graph():
|
||||
|
||||
t.touch("e/test3.h")
|
||||
t.run_build_system()
|
||||
t.expect_touch("bin/$toolset/debug/test.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/test.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.touch("b/test3.h")
|
||||
@@ -234,7 +234,7 @@ def test_order_graph():
|
||||
|
||||
t.touch("b/test4.h")
|
||||
t.run_build_system()
|
||||
t.expect_touch("bin/$toolset/debug/test.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/test.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.touch("d/test4.h")
|
||||
|
||||
@@ -28,6 +28,6 @@ inline void foo() {}
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/a.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/a.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -23,7 +23,7 @@ exe hello3 : hello.cpp ;
|
||||
t.write("p2/hello.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system(["p1", "p2//hello3"])
|
||||
t.expect_addition("p1/bin/$toolset/debug/hello.exe")
|
||||
t.expect_addition("p2/bin/$toolset/debug/hello3.exe")
|
||||
t.expect_addition("p1/bin/$toolset/debug*/hello.exe")
|
||||
t.expect_addition("p2/bin/$toolset/debug*/hello3.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -72,7 +72,7 @@ int main() {}
|
||||
t.write("x/include2/h2.hpp", "\n")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("x/bin/$toolset/debug/m.exe")
|
||||
t.expect_addition("x/bin/$toolset/debug*/m.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -90,7 +90,7 @@ int main() { return OK; }
|
||||
""")
|
||||
t.write("h2/header.h", "int const OK = 0;\n")
|
||||
t.run_build_system()
|
||||
t.expect_addition("sub/bin/$toolset/debug/a.exe")
|
||||
t.expect_addition("sub/bin/$toolset/debug*/a.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -126,8 +126,8 @@ int main() {}
|
||||
t.write(header, "int some_func();\n")
|
||||
t.write("child_dir/folder_to_include/jamfile.jam", "")
|
||||
|
||||
expected_x1 = "child_dir/bin/$toolset/debug/x1.obj"
|
||||
expected_x2 = "child_dir/bin/$toolset/debug/x2.obj"
|
||||
expected_x1 = "child_dir/bin/$toolset/debug*/x1.obj"
|
||||
expected_x2 = "child_dir/bin/$toolset/debug*/x2.obj"
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition(expected_x1)
|
||||
|
||||
@@ -38,7 +38,7 @@ int main() { TestClass c(1, 2); }
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/hello.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.exe")
|
||||
|
||||
|
||||
# Now make the header unusable, without changing timestamp. If everything is OK,
|
||||
@@ -48,8 +48,9 @@ t.expect_addition("bin/$toolset/debug/hello.exe")
|
||||
t.copy_preserving_timestamp("pch.hpp.bad", "pch.hpp")
|
||||
|
||||
t.rm("bin/$toolset/debug/hello.obj")
|
||||
t.rm("bin/$toolset/debug/*/hello.obj")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/hello.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.obj")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -27,8 +27,8 @@ t.expand_toolset("ext/jamfile.jam")
|
||||
# is picked, depending of variant. This also checks that correct includes for
|
||||
# prebuilt libraries are used.
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/hello.exe")
|
||||
t.expect_addition("bin/$toolset/release/hello.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.exe")
|
||||
t.expect_addition("bin/$toolset/release*/hello.exe")
|
||||
|
||||
t.rm("bin")
|
||||
|
||||
@@ -37,7 +37,7 @@ t.rm("bin")
|
||||
t.copy("ext/jamfile3.jam", "ext/jamfile.jam")
|
||||
t.expand_toolset("ext/jamfile.jam")
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/hello.exe")
|
||||
t.expect_addition("bin/$toolset/release/hello.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.exe")
|
||||
t.expect_addition("bin/$toolset/release*/hello.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -18,7 +18,7 @@ else
|
||||
{
|
||||
prefix = "lib" ;
|
||||
}
|
||||
if [ MATCH ^(clang-)?(darwin) : $toolset ]
|
||||
if [ os.name ] in MACOSX
|
||||
{
|
||||
dll-suffix = dylib ;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ else
|
||||
{
|
||||
prefix = "lib" ;
|
||||
}
|
||||
if [ MATCH ^(clang-)?(darwin) : $toolset ]
|
||||
if [ os.name ] in MACOSX
|
||||
{
|
||||
dll-suffix = dylib ;
|
||||
}
|
||||
|
||||
@@ -46,8 +46,8 @@ int foo()
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/hello.ii")
|
||||
t.expect_addition("bin/$toolset/debug/a.i")
|
||||
t.expect_addition("bin/$toolset/debug/hello.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.ii")
|
||||
t.expect_addition("bin/$toolset/debug*/a.i")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -45,7 +45,7 @@ t.copy("src/a.cpp", "src/b.cpp")
|
||||
t.run_build_system()
|
||||
|
||||
# Test that there is no "main-target-a" part.
|
||||
# t.expect_addition("src/bin/$toolset/debug/a.exe")
|
||||
# t.expect_addition("src/bin/$toolset/debug/b.exe")
|
||||
# t.expect_addition("src/bin/$toolset/debug*/a.exe")
|
||||
# t.expect_addition("src/bin/$toolset/debug*/b.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -27,14 +27,14 @@ void force_import_lib_creation() {}
|
||||
t.write("d3/a.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system(subdir="d1")
|
||||
t.expect_addition("d1/bin/$toolset/debug/a.exe")
|
||||
t.expect_addition("d1/bin/$toolset/debug*/a.exe")
|
||||
|
||||
t.run_build_system(subdir="d3/d")
|
||||
t.expect_addition("d3/d/bin/$toolset/debug/a.exe")
|
||||
t.expect_addition("d3/d/bin/$toolset/debug*/a.exe")
|
||||
|
||||
t.rm("d2/d/bin")
|
||||
t.run_build_system(subdir="d2/d")
|
||||
t.expect_addition("d2/d/bin/$toolset/debug/l.dll")
|
||||
t.expect_addition("d2/d/bin/$toolset/debug*/l.dll")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -63,7 +63,7 @@ void force_import_lib_creation() {}
|
||||
t.write("d2/d/jamfile.jam", "lib l : [ glob *.cpp ] ;")
|
||||
|
||||
t.run_build_system(subdir="d1")
|
||||
t.expect_addition("d1/bin/$toolset/debug/a.exe")
|
||||
t.expect_addition("d1/bin/$toolset/debug*/a.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -93,7 +93,7 @@ void force_import_lib_creation() {}
|
||||
t.write("d2/d/jamfile.jam", "lib l : [ glob *.cpp ] ;")
|
||||
|
||||
t.run_build_system(subdir="d1")
|
||||
t.expect_addition("d1/bin/$toolset/debug/a.exe")
|
||||
t.expect_addition("d1/bin/$toolset/debug*/a.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -120,7 +120,7 @@ void force_import_lib_creation() {}
|
||||
t.write("d2/d/jamfile.jam", "lib l : [ glob *.cpp ] ;")
|
||||
|
||||
t.run_build_system(subdir="d1")
|
||||
t.expect_addition("d1/bin/$toolset/debug/a.exe")
|
||||
t.expect_addition("d1/bin/$toolset/debug*/a.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -179,7 +179,7 @@ void force_import_lib_creation() {}
|
||||
t.write("d2/d/jamfile.jam", "lib l : [ glob *.cpp ] ;")
|
||||
|
||||
t.run_build_system(subdir="d1")
|
||||
t.expect_addition("d1/bin/$toolset/debug/a.exe")
|
||||
t.expect_addition("d1/bin/$toolset/debug*/a.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -198,7 +198,7 @@ def test_glob_excludes_in_subdirectory():
|
||||
t.write("p/jamfile.jam", "exe p : [ glob *.c : p_x.c ] ;")
|
||||
|
||||
t.run_build_system(subdir="p")
|
||||
t.expect_addition("p/bin/$toolset/debug/p.exe")
|
||||
t.expect_addition("p/bin/$toolset/debug*/p.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ bbb b-invalid-target : /foo//invalid ;
|
||||
""")
|
||||
|
||||
t.run_build_system(["b1", "b2"])
|
||||
t.expect_addition("bin/$toolset/debug/b%d._b" % x for x in range(1, 3))
|
||||
t.expect_addition("bin/$toolset/debug*/b%d._b" % x for x in range(1, 3))
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system(["b-invalid"], status=1)
|
||||
|
||||
@@ -29,6 +29,6 @@ my-lib foo ;
|
||||
|
||||
t.run_build_system(subdir="sub")
|
||||
|
||||
t.expect_addition("sub/bin/$toolset/debug/link-static/foo.lib")
|
||||
t.expect_addition("sub/bin/$toolset/debug/link-static*/foo.lib")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -22,114 +22,114 @@ t.expect_output_lines("error: Could not find parent for project at '.'\n"
|
||||
t.set_tree("project-test3")
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/a.obj")
|
||||
t.expect_content("bin/$toolset/debug/a.obj", """\
|
||||
t.expect_addition("bin/$toolset/debug*/a.obj")
|
||||
t.expect_content("bin/$toolset/debug*/a.obj", """\
|
||||
$toolset/debug
|
||||
a.cpp
|
||||
""")
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/a.exe")
|
||||
t.expect_content("bin/$toolset/debug/a.exe",
|
||||
"$toolset/debug\n" +
|
||||
"bin/$toolset/debug/a.obj lib/bin/$toolset/debug/b.obj " +
|
||||
"lib2/bin/$toolset/debug/c.obj lib2/bin/$toolset/debug/d.obj " +
|
||||
"lib2/helper/bin/$toolset/debug/e.obj " +
|
||||
"lib3/bin/$toolset/debug/f.obj\n"
|
||||
t.expect_addition("bin/$toolset/debug*/a.exe")
|
||||
t.expect_content("bin/$toolset/debug*/a.exe",
|
||||
"$toolset/debug*\n" +
|
||||
"bin/$toolset/debug*/a.obj lib/bin/$toolset/debug*/b.obj " +
|
||||
"lib2/bin/$toolset/debug*/c.obj lib2/bin/$toolset/debug*/d.obj " +
|
||||
"lib2/helper/bin/$toolset/debug*/e.obj " +
|
||||
"lib3/bin/$toolset/debug*/f.obj\n"
|
||||
)
|
||||
|
||||
t.expect_addition("lib/bin/$toolset/debug/b.obj")
|
||||
t.expect_content("lib/bin/$toolset/debug/b.obj", """\
|
||||
t.expect_addition("lib/bin/$toolset/debug*/b.obj")
|
||||
t.expect_content("lib/bin/$toolset/debug*/b.obj", """\
|
||||
$toolset/debug
|
||||
lib/b.cpp
|
||||
""")
|
||||
|
||||
t.expect_addition("lib/bin/$toolset/debug/m.exe")
|
||||
t.expect_content("lib/bin/$toolset/debug/m.exe", """\
|
||||
t.expect_addition("lib/bin/$toolset/debug*/m.exe")
|
||||
t.expect_content("lib/bin/$toolset/debug*/m.exe", """\
|
||||
$toolset/debug
|
||||
lib/bin/$toolset/debug/b.obj lib2/bin/$toolset/debug/c.obj
|
||||
lib/bin/$toolset/debug*/b.obj lib2/bin/$toolset/debug*/c.obj
|
||||
""")
|
||||
|
||||
t.expect_addition("lib2/bin/$toolset/debug/c.obj")
|
||||
t.expect_content("lib2/bin/$toolset/debug/c.obj", """\
|
||||
t.expect_addition("lib2/bin/$toolset/debug*/c.obj")
|
||||
t.expect_content("lib2/bin/$toolset/debug*/c.obj", """\
|
||||
$toolset/debug
|
||||
lib2/c.cpp
|
||||
""")
|
||||
|
||||
t.expect_addition("lib2/bin/$toolset/debug/d.obj")
|
||||
t.expect_content("lib2/bin/$toolset/debug/d.obj", """\
|
||||
t.expect_addition("lib2/bin/$toolset/debug*/d.obj")
|
||||
t.expect_content("lib2/bin/$toolset/debug*/d.obj", """\
|
||||
$toolset/debug
|
||||
lib2/d.cpp
|
||||
""")
|
||||
|
||||
t.expect_addition("lib2/bin/$toolset/debug/l.exe")
|
||||
t.expect_content("lib2/bin/$toolset/debug/l.exe", """\
|
||||
t.expect_addition("lib2/bin/$toolset/debug*/l.exe")
|
||||
t.expect_content("lib2/bin/$toolset/debug*/l.exe", """\
|
||||
$toolset/debug
|
||||
lib2/bin/$toolset/debug/c.obj bin/$toolset/debug/a.obj
|
||||
lib2/bin/$toolset/debug*/c.obj bin/$toolset/debug*/a.obj
|
||||
""")
|
||||
|
||||
t.expect_addition("lib2/helper/bin/$toolset/debug/e.obj")
|
||||
t.expect_content("lib2/helper/bin/$toolset/debug/e.obj", """\
|
||||
t.expect_addition("lib2/helper/bin/$toolset/debug*/e.obj")
|
||||
t.expect_content("lib2/helper/bin/$toolset/debug*/e.obj", """\
|
||||
$toolset/debug
|
||||
lib2/helper/e.cpp
|
||||
""")
|
||||
|
||||
t.expect_addition("lib3/bin/$toolset/debug/f.obj")
|
||||
t.expect_content("lib3/bin/$toolset/debug/f.obj", """\
|
||||
t.expect_addition("lib3/bin/$toolset/debug*/f.obj")
|
||||
t.expect_content("lib3/bin/$toolset/debug*/f.obj", """\
|
||||
$toolset/debug
|
||||
lib3/f.cpp lib2/helper/bin/$toolset/debug/e.obj
|
||||
lib3/f.cpp lib2/helper/bin/$toolset/debug*/e.obj
|
||||
""")
|
||||
|
||||
t.touch("a.cpp")
|
||||
t.run_build_system()
|
||||
t.expect_touch(["bin/$toolset/debug/a.obj",
|
||||
"bin/$toolset/debug/a.exe",
|
||||
"lib2/bin/$toolset/debug/l.exe"])
|
||||
t.expect_touch(["bin/$toolset/debug*/a.obj",
|
||||
"bin/$toolset/debug*/a.exe",
|
||||
"lib2/bin/$toolset/debug*/l.exe"])
|
||||
|
||||
t.run_build_system(["release", "optimization=off,speed"])
|
||||
t.expect_addition(["bin/$toolset/release/a.exe",
|
||||
"bin/$toolset/release/a.obj",
|
||||
"bin/$toolset/release/optimization-off/a.exe",
|
||||
"bin/$toolset/release/optimization-off/a.obj"])
|
||||
t.expect_addition(["bin/$toolset/release/optimization-off*/a.exe",
|
||||
"bin/$toolset/release/optimization-off*/a.obj",
|
||||
"bin/$toolset/release*/a.exe",
|
||||
"bin/$toolset/release*/a.obj"])
|
||||
|
||||
t.run_build_system(["--clean-all"])
|
||||
t.expect_removal(["bin/$toolset/debug/a.obj",
|
||||
"bin/$toolset/debug/a.exe",
|
||||
"lib/bin/$toolset/debug/b.obj",
|
||||
"lib/bin/$toolset/debug/m.exe",
|
||||
"lib2/bin/$toolset/debug/c.obj",
|
||||
"lib2/bin/$toolset/debug/d.obj",
|
||||
"lib2/bin/$toolset/debug/l.exe",
|
||||
"lib3/bin/$toolset/debug/f.obj"])
|
||||
t.expect_removal(["bin/$toolset/debug*/a.obj",
|
||||
"bin/$toolset/debug*/a.exe",
|
||||
"lib/bin/$toolset/debug*/b.obj",
|
||||
"lib/bin/$toolset/debug*/m.exe",
|
||||
"lib2/bin/$toolset/debug*/c.obj",
|
||||
"lib2/bin/$toolset/debug*/d.obj",
|
||||
"lib2/bin/$toolset/debug*/l.exe",
|
||||
"lib3/bin/$toolset/debug*/f.obj"])
|
||||
|
||||
# Now test target ids in command line.
|
||||
t.set_tree("project-test3")
|
||||
t.run_build_system(["lib//b.obj"])
|
||||
t.expect_addition("lib/bin/$toolset/debug/b.obj")
|
||||
t.expect_addition("lib/bin/$toolset/debug*/b.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system(["--clean", "lib//b.obj"])
|
||||
t.expect_removal("lib/bin/$toolset/debug/b.obj")
|
||||
t.expect_removal("lib/bin/$toolset/debug*/b.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system(["lib//b.obj"])
|
||||
t.expect_addition("lib/bin/$toolset/debug/b.obj")
|
||||
t.expect_addition("lib/bin/$toolset/debug*/b.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system(["release", "lib2/helper//e.obj", "/lib3//f.obj"])
|
||||
t.expect_addition("lib2/helper/bin/$toolset/release/e.obj")
|
||||
t.expect_addition("lib3/bin/$toolset/release/f.obj")
|
||||
t.expect_addition("lib2/helper/bin/$toolset/release*/e.obj")
|
||||
t.expect_addition("lib3/bin/$toolset/release*/f.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
# Test project ids in command line work as well.
|
||||
t.set_tree("project-test3")
|
||||
t.run_build_system(["/lib2"])
|
||||
t.expect_addition("lib2/bin/$toolset/debug/" *
|
||||
t.expect_addition("lib2/bin/$toolset/debug*/" *
|
||||
BoostBuild.List("c.obj d.obj l.exe"))
|
||||
t.expect_addition("bin/$toolset/debug/a.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/a.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system(["lib"])
|
||||
t.expect_addition("lib/bin/$toolset/debug/" *
|
||||
t.expect_addition("lib/bin/$toolset/debug*/" *
|
||||
BoostBuild.List("b.obj m.exe"))
|
||||
t.expect_nothing_more()
|
||||
|
||||
|
||||
@@ -14,28 +14,28 @@ t.set_tree("project-test4")
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/a.obj")
|
||||
t.expect_content("bin/$toolset/debug/a.obj",
|
||||
"""$toolset/debug/include-everything
|
||||
t.expect_addition("bin/$toolset/debug*/a.obj")
|
||||
t.expect_content("bin/$toolset/debug*/a.obj",
|
||||
"""$toolset/debug*/include-everything
|
||||
a.cpp
|
||||
""")
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/a.exe")
|
||||
t.expect_content("bin/$toolset/debug/a.exe",
|
||||
"$toolset/debug/include-everything\n" +
|
||||
"bin/$toolset/debug/a.obj lib/bin/$toolset/debug/optimization-speed/b.obj\n"
|
||||
t.expect_addition("bin/$toolset/debug*/a.exe")
|
||||
t.expect_content("bin/$toolset/debug*/a.exe",
|
||||
"$toolset/debug*/include-everything\n" +
|
||||
"bin/$toolset/debug*/a.obj lib/bin/$toolset/debug/optimization-speed*/b.obj\n"
|
||||
)
|
||||
|
||||
t.expect_addition("lib/bin/$toolset/debug/optimization-speed/b.obj")
|
||||
t.expect_content("lib/bin/$toolset/debug/optimization-speed/b.obj",
|
||||
"""$toolset/debug/include-everything/optimization-speed
|
||||
t.expect_addition("lib/bin/$toolset/debug/optimization-speed*/b.obj")
|
||||
t.expect_content("lib/bin/$toolset/debug/optimization-speed*/b.obj",
|
||||
"""$toolset/debug/include-everything/optimization-speed*
|
||||
lib/b.cpp
|
||||
""")
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/b.exe")
|
||||
t.expect_content("bin/$toolset/debug/b.exe",
|
||||
"$toolset/debug/define-MACROS/include-everything\n" +
|
||||
"bin/$toolset/debug/a.obj\n"
|
||||
t.expect_addition("bin/$toolset/debug*/b.exe")
|
||||
t.expect_content("bin/$toolset/debug*/b.exe",
|
||||
"$toolset/debug/define-MACROS/include-everything*\n" +
|
||||
"bin/$toolset/debug*/a.obj\n"
|
||||
)
|
||||
|
||||
t.copy("lib/jamfile3.jam", "lib/jamfile.jam")
|
||||
@@ -55,11 +55,11 @@ t.copy("jamfile5.jam", "jamfile.jam")
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition("lib/bin/$toolset/release/b.obj")
|
||||
t.expect_addition("lib/bin/$toolset/release*/b.obj")
|
||||
|
||||
t.expect_content("bin/$toolset/debug/a.exe",
|
||||
"$toolset/debug/include-everything\n" +
|
||||
"bin/$toolset/debug/a.obj lib/bin/$toolset/release/b.obj\n"
|
||||
t.expect_content("bin/$toolset/debug*/a.exe",
|
||||
"$toolset/debug/include-everything*\n" +
|
||||
"bin/$toolset/debug*/a.obj lib/bin/$toolset/release*/b.obj\n"
|
||||
)
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -47,13 +47,13 @@ helper() {}
|
||||
|
||||
# First test that when outcomes are expected, all .test files are created.
|
||||
t.run_build_system(["hardcode-dll-paths=false"], stderr=None, status=None)
|
||||
t.expect_addition("bin/c.test/$toolset/debug/c.test")
|
||||
t.expect_addition("bin/c-f.test/$toolset/debug/c-f.test")
|
||||
t.expect_addition("bin/r.test/$toolset/debug/r.test")
|
||||
t.expect_addition("bin/r-f.test/$toolset/debug/r-f.test")
|
||||
t.expect_addition("bin/c.test/$toolset/debug*/c.test")
|
||||
t.expect_addition("bin/c-f.test/$toolset/debug*/c-f.test")
|
||||
t.expect_addition("bin/r.test/$toolset/debug*/r.test")
|
||||
t.expect_addition("bin/r-f.test/$toolset/debug*/r-f.test")
|
||||
|
||||
# Make sure args are handled.
|
||||
t.expect_content("bin/r.test/$toolset/debug/r.output",
|
||||
t.expect_content("bin/r.test/$toolset/debug*/r.output",
|
||||
"foo\nbar\n*\nEXIT STATUS: 0*\n", True)
|
||||
|
||||
# Test that input file is handled as well.
|
||||
@@ -84,13 +84,13 @@ time compilation : c-obj ;
|
||||
""")
|
||||
|
||||
t.run_build_system(["hardcode-dll-paths=false"])
|
||||
t.expect_content("bin/r.test/$toolset/debug/r.output", """\
|
||||
t.expect_content("bin/r.test/$toolset/debug*/r.output", """\
|
||||
test input
|
||||
EXIT STATUS: 0
|
||||
""")
|
||||
|
||||
t.expect_addition('bin/$toolset/debug/execution.time')
|
||||
t.expect_addition('bin/$toolset/debug/compilation.time')
|
||||
t.expect_addition('bin/$toolset/debug*/execution.time')
|
||||
t.expect_addition('bin/$toolset/debug*/compilation.time')
|
||||
|
||||
# Make sure test failures are detected. Reverse expectation and see if .test
|
||||
# files are created or not.
|
||||
@@ -105,9 +105,9 @@ run r-f.cpp ;
|
||||
t.touch(BoostBuild.List("c.cpp c-f.cpp r.cpp r-f.cpp"))
|
||||
|
||||
t.run_build_system(["hardcode-dll-paths=false"], stderr=None, status=1)
|
||||
t.expect_removal("bin/c.test/$toolset/debug/c.test")
|
||||
t.expect_removal("bin/c-f.test/$toolset/debug/c-f.test")
|
||||
t.expect_removal("bin/r.test/$toolset/debug/r.test")
|
||||
t.expect_removal("bin/r-f.test/$toolset/debug/r-f.test")
|
||||
t.expect_removal("bin/c.test/$toolset/debug*/c.test")
|
||||
t.expect_removal("bin/c-f.test/$toolset/debug*/c-f.test")
|
||||
t.expect_removal("bin/r.test/$toolset/debug*/r.test")
|
||||
t.expect_removal("bin/r-f.test/$toolset/debug*/r-f.test")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -16,14 +16,14 @@ t.write("jamroot.jam", "exe a : src/a.cpp ;")
|
||||
t.write("src/a.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/src/a.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/src/a.obj")
|
||||
|
||||
# Test that the relative path to source is preserved
|
||||
# when using 'glob'.
|
||||
t.rm("bin")
|
||||
t.write("jamroot.jam", "exe a : [ glob src/*.cpp ] ;")
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/src/a.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/src/a.obj")
|
||||
|
||||
|
||||
# Test that relative path with ".." is *not* added to
|
||||
@@ -33,6 +33,6 @@ t.write("jamroot.jam", "")
|
||||
t.write("a.cpp", "int main() { return 0; }\n")
|
||||
t.write("build/Jamfile", "exe a : ../a.cpp ; ")
|
||||
t.run_build_system(subdir="build")
|
||||
t.expect_addition("build/bin/$toolset/debug/a.obj")
|
||||
t.expect_addition("build/bin/$toolset/debug*/a.obj")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -55,10 +55,10 @@ exe hello : hello.cpp ;
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition("sub/bin/$toolset/debug/link-static/hello.exe")
|
||||
t.expect_addition("sub2/bin/$toolset/debug/link-static/hello.exe")
|
||||
t.expect_addition("sub3/bin/$toolset/debug/threading-multi/hello.exe")
|
||||
t.expect_addition("sub4/bin/$toolset/debug/threading-multi/hello.exe")
|
||||
t.expect_addition("sub/bin/$toolset/debug/link-static*/hello.exe")
|
||||
t.expect_addition("sub2/bin/$toolset/debug/link-static*/hello.exe")
|
||||
t.expect_addition("sub3/bin/$toolset/debug/threading-multi*/hello.exe")
|
||||
t.expect_addition("sub4/bin/$toolset/debug/threading-multi*/hello.exe")
|
||||
|
||||
t.rm(".")
|
||||
|
||||
@@ -84,6 +84,6 @@ Broken
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition("sub/bin/$toolset/debug/hello.exe")
|
||||
t.expect_addition("sub/bin/$toolset/debug*/hello.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -35,8 +35,8 @@ obj test : test.cpp : <implicit-dependency>header3.h ;
|
||||
""")
|
||||
|
||||
t.run_build_system(["-j2"])
|
||||
t.expect_addition("bin/$toolset/debug/header3.h")
|
||||
t.expect_addition("bin/$toolset/debug/test.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/header3.h")
|
||||
t.expect_addition("bin/$toolset/debug*/test.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.rm(".")
|
||||
@@ -72,10 +72,10 @@ obj test : test.cpp :
|
||||
""")
|
||||
|
||||
t.run_build_system(["-j2", "test"])
|
||||
t.expect_addition("bin/$toolset/debug/header1.h")
|
||||
t.expect_addition("bin/$toolset/debug/header2.h")
|
||||
t.expect_addition("bin/$toolset/debug/header3.h")
|
||||
t.expect_addition("bin/$toolset/debug/test.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/header1.h")
|
||||
t.expect_addition("bin/$toolset/debug*/header2.h")
|
||||
t.expect_addition("bin/$toolset/debug*/header3.h")
|
||||
t.expect_addition("bin/$toolset/debug*/test.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.rm(".")
|
||||
@@ -122,10 +122,10 @@ obj test : test.cpp :
|
||||
""")
|
||||
|
||||
t.run_build_system(["-j2", "test"])
|
||||
t.expect_addition("bin/$toolset/debug/header1.h")
|
||||
t.expect_addition("bin/$toolset/debug/header2.h")
|
||||
t.expect_addition("bin/$toolset/debug/header3.h")
|
||||
t.expect_addition("bin/$toolset/debug/test.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/header1.h")
|
||||
t.expect_addition("bin/$toolset/debug*/header2.h")
|
||||
t.expect_addition("bin/$toolset/debug*/header3.h")
|
||||
t.expect_addition("bin/$toolset/debug*/test.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.rm(".")
|
||||
@@ -184,18 +184,18 @@ exe test : test2.cpp test1.cpp : <implicit-dependency>header3.h ;
|
||||
""")
|
||||
|
||||
t.run_build_system(["-j2", "test"])
|
||||
t.expect_addition("bin/$toolset/debug/header3.h")
|
||||
t.expect_addition("bin/$toolset/debug/test1.obj")
|
||||
t.expect_addition("bin/$toolset/debug/test2.obj")
|
||||
t.expect_addition("bin/$toolset/debug/test.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/header3.h")
|
||||
t.expect_addition("bin/$toolset/debug*/test1.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/test2.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/test.exe")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.touch("header3.in")
|
||||
t.run_build_system(["-j2", "test"])
|
||||
t.expect_touch("bin/$toolset/debug/header3.h")
|
||||
t.expect_touch("bin/$toolset/debug/test1.obj")
|
||||
t.expect_touch("bin/$toolset/debug/test2.obj")
|
||||
t.expect_touch("bin/$toolset/debug/test.exe")
|
||||
t.expect_touch("bin/$toolset/debug*/header3.h")
|
||||
t.expect_touch("bin/$toolset/debug*/test1.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/test2.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/test.exe")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.rm(".")
|
||||
@@ -256,10 +256,10 @@ exe test : test2.cpp test1.cpp : <implicit-dependency>header2.h <include>. ;
|
||||
""")
|
||||
|
||||
t.run_build_system(["-j2", "test"])
|
||||
t.expect_addition("bin/$toolset/debug/header2.h")
|
||||
t.expect_addition("bin/$toolset/debug/test1.obj")
|
||||
t.expect_addition("bin/$toolset/debug/test2.obj")
|
||||
t.expect_addition("bin/$toolset/debug/test.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/header2.h")
|
||||
t.expect_addition("bin/$toolset/debug*/test1.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/test2.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/test.exe")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -24,12 +24,12 @@ t.write("hello.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/hello.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/hello.obj")
|
||||
|
||||
t.touch("hello.cpp")
|
||||
t.run_build_system(["s"])
|
||||
# If 'hello' in the 's' target resolved to file in the current dir, nothing
|
||||
# will be rebuilt.
|
||||
t.expect_touch("bin/$toolset/debug/hello.obj")
|
||||
t.expect_touch("bin/$toolset/debug*/hello.obj")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -26,17 +26,17 @@ void foo() {}
|
||||
""");
|
||||
|
||||
t.run_build_system(subdir="lib")
|
||||
t.expect_addition("lib/bin/$toolset/debug/test_lib.dll")
|
||||
t.expect_addition("lib/bin/$toolset/debug*/test_lib.dll")
|
||||
|
||||
|
||||
# Auto adjusting of suffixes does not work, since we need to
|
||||
# change dll to lib.
|
||||
if ( ( os.name == "nt" ) or os.uname()[0].lower().startswith("cygwin") ) and \
|
||||
( BoostBuild.get_toolset() != "gcc" ):
|
||||
t.copy("lib/bin/$toolset/debug/test_lib.implib", "lib/test_lib.implib")
|
||||
t.copy("lib/bin/$toolset/debug/test_lib.dll", "lib/test_lib.dll")
|
||||
t.copy("lib/bin/$toolset/debug*/test_lib.implib", "lib/test_lib.implib")
|
||||
t.copy("lib/bin/$toolset/debug*/test_lib.dll", "lib/test_lib.dll")
|
||||
else:
|
||||
t.copy("lib/bin/$toolset/debug/test_lib.dll", "lib/test_lib.dll")
|
||||
t.copy("lib/bin/$toolset/debug*/test_lib.dll", "lib/test_lib.dll")
|
||||
|
||||
|
||||
# Test that the simplest usage of searched library works.
|
||||
@@ -65,8 +65,9 @@ helper() { foo(); }
|
||||
""")
|
||||
|
||||
t.run_build_system(["-d2"])
|
||||
t.expect_addition("bin/$toolset/debug/main.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/main.exe")
|
||||
t.rm("bin/$toolset/debug/main.exe")
|
||||
t.rm("bin/$toolset/debug/*/main.exe")
|
||||
|
||||
|
||||
# Test that 'unit-test' will correctly add runtime paths to searched libraries.
|
||||
@@ -83,8 +84,9 @@ lib test_lib : : <name>test_lib <search>lib ;
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/main.passed")
|
||||
t.expect_addition("bin/$toolset/debug*/main.passed")
|
||||
t.rm("bin/$toolset/debug/main.exe")
|
||||
t.rm("bin/$toolset/debug/*/main.exe")
|
||||
|
||||
|
||||
# Now try using searched lib from static lib. Request shared version of searched
|
||||
@@ -96,9 +98,10 @@ lib test_lib : : <name>test_lib <search>lib ;
|
||||
""")
|
||||
|
||||
t.run_build_system(stderr=None)
|
||||
t.expect_addition("bin/$toolset/debug/main.exe")
|
||||
t.expect_addition("bin/$toolset/debug/link-static/helper.lib")
|
||||
t.expect_addition("bin/$toolset/debug*/main.exe")
|
||||
t.expect_addition("bin/$toolset/debug/link-static*/helper.lib")
|
||||
t.rm("bin/$toolset/debug/main.exe")
|
||||
t.rm("bin/$toolset/debug/*/main.exe")
|
||||
|
||||
# A regression test: <library>property referring to searched-lib was being
|
||||
# mishandled. As the result, we were putting target name to the command line!
|
||||
|
||||
@@ -74,8 +74,8 @@ t.write("file2.c", "")
|
||||
t.write("file3.c", "")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/check.order-test")
|
||||
t.expect_content("bin/$toolset/debug/check.order-test", """\
|
||||
t.expect_addition("bin/$toolset/debug*/check.order-test")
|
||||
t.expect_content("bin/$toolset/debug*/check.order-test", """\
|
||||
file2.c
|
||||
file1.c
|
||||
file3.c
|
||||
|
||||
@@ -19,19 +19,19 @@ def reset():
|
||||
t.rm("lib/bin")
|
||||
|
||||
t.run_build_system(subdir='lib')
|
||||
t.expect_addition("lib/bin/$toolset/debug/" * BoostBuild.List("c.obj "
|
||||
t.expect_addition("lib/bin/$toolset/debug*/" * BoostBuild.List("c.obj "
|
||||
"auxilliary1.lib auxilliary2.dll"))
|
||||
t.expect_nothing_more()
|
||||
|
||||
reset()
|
||||
t.run_build_system(["link=shared"], subdir="lib")
|
||||
t.expect_addition("lib/bin/$toolset/debug/" * BoostBuild.List("c.obj "
|
||||
t.expect_addition("lib/bin/$toolset/debug*/" * BoostBuild.List("c.obj "
|
||||
"auxilliary1.lib auxilliary2.dll"))
|
||||
t.expect_nothing_more()
|
||||
|
||||
reset()
|
||||
t.run_build_system(["link=static"], subdir="lib")
|
||||
t.expect_addition("lib/bin/$toolset/debug/link-static/" * BoostBuild.List(
|
||||
t.expect_addition("lib/bin/$toolset/debug/link-static*/" * BoostBuild.List(
|
||||
"c.obj auxilliary1.lib auxilliary2.lib"))
|
||||
t.expect_nothing_more()
|
||||
|
||||
|
||||
@@ -73,6 +73,6 @@ second a : a.cpp ;
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/a")
|
||||
t.expect_addition("bin/$toolset/debug*/a")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
18
test/tag.py
18
test/tag.py
@@ -34,7 +34,7 @@ exe a : a.cpp ;
|
||||
t.write("version-1.32.0/a.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system(subdir="version-1.32.0")
|
||||
t.expect_addition("version-1.32.0/bin/$toolset/debug/a.exe")
|
||||
t.expect_addition("version-1.32.0/bin/$toolset/debug*/a.exe")
|
||||
t.expect_output_lines("The tag rule has been invoked.")
|
||||
|
||||
|
||||
@@ -85,17 +85,17 @@ __declspec (dllexport) void x () {}
|
||||
""")
|
||||
|
||||
file_list = (
|
||||
BoostBuild.List("bin/$toolset/debug/a_ds.exe") +
|
||||
BoostBuild.List("bin/$toolset/debug/b_ds.dll") +
|
||||
BoostBuild.List("bin/$toolset/debug*/a_ds.exe") +
|
||||
BoostBuild.List("bin/$toolset/debug*/b_ds.dll") +
|
||||
BoostBuild.List("c/a_ds.exe") +
|
||||
BoostBuild.List("bin/$toolset/release/a_rs.exe") +
|
||||
BoostBuild.List("bin/$toolset/release/b_rs.dll") +
|
||||
BoostBuild.List("bin/$toolset/release*/a_rs.exe") +
|
||||
BoostBuild.List("bin/$toolset/release*/b_rs.dll") +
|
||||
BoostBuild.List("c/a_rs.exe") +
|
||||
BoostBuild.List("bin/$toolset/debug/link-static/a_dt.exe") +
|
||||
BoostBuild.List("bin/$toolset/debug/link-static/b_dt.lib") +
|
||||
BoostBuild.List("bin/$toolset/debug/link-static*/a_dt.exe") +
|
||||
BoostBuild.List("bin/$toolset/debug/link-static*/b_dt.lib") +
|
||||
BoostBuild.List("c/a_dt.exe") +
|
||||
BoostBuild.List("bin/$toolset/release/link-static/a_rt.exe") +
|
||||
BoostBuild.List("bin/$toolset/release/link-static/b_rt.lib") +
|
||||
BoostBuild.List("bin/$toolset/release/link-static*/a_rt.exe") +
|
||||
BoostBuild.List("bin/$toolset/release/link-static*/b_rt.lib") +
|
||||
BoostBuild.List("c/a_rt.exe"))
|
||||
|
||||
variants = ["debug", "release", "link=static,shared"]
|
||||
|
||||
@@ -27,7 +27,7 @@ int main() {}
|
||||
t.run_build_system()
|
||||
|
||||
# First, create a list of three pathnames.
|
||||
file_list = BoostBuild.List("bin/$toolset/debug/") * \
|
||||
file_list = BoostBuild.List("bin/$toolset/debug*/") * \
|
||||
BoostBuild.List("hello.exe hello.obj")
|
||||
# Second, assert that those files were added as result of the last build system
|
||||
# invocation.
|
||||
|
||||
@@ -11,7 +11,7 @@ t = BoostBuild.Tester()
|
||||
|
||||
t.set_tree("test2")
|
||||
|
||||
file_list = 'bin/$toolset/debug/' * \
|
||||
file_list = 'bin/$toolset/debug*/' * \
|
||||
BoostBuild.List("foo foo.o")
|
||||
|
||||
t.run_build_system("-sBOOST_BUILD_PATH=" + t.original_workdir + "/..")
|
||||
|
||||
@@ -170,7 +170,6 @@ tests = ["absolute_sources",
|
||||
"builtin_echo",
|
||||
"builtin_exit",
|
||||
"builtin_glob",
|
||||
"builtin_glob_archive",
|
||||
"builtin_split_by_characters",
|
||||
"bzip2",
|
||||
"c_file",
|
||||
@@ -301,6 +300,10 @@ if toolset.startswith("gcc"):
|
||||
if toolset.startswith("gcc") or toolset.startswith("msvc"):
|
||||
tests.append("pch")
|
||||
|
||||
# Disable on OSX as it doesn't seem to work for unknown reasons.
|
||||
if sys.platform != 'darwin':
|
||||
tests.append("builtin_glob_archive")
|
||||
|
||||
if "--extras" in sys.argv:
|
||||
tests.append("boostbook")
|
||||
tests.append("qt4")
|
||||
|
||||
@@ -34,18 +34,18 @@ testing.compile-fail "invalid source.cpp" ;
|
||||
""")
|
||||
|
||||
t.run_build_system(status=0)
|
||||
t.expect_addition("bin/invalid source.test/$toolset/debug/invalid source.obj")
|
||||
t.expect_addition("bin/invalid source.test/$toolset/debug/invalid source.test")
|
||||
t.expect_addition("bin/valid source.test/$toolset/debug/valid source.obj")
|
||||
t.expect_addition("bin/valid source.test/$toolset/debug/valid source.test")
|
||||
t.expect_addition("bin/invalid source.test/$toolset/debug*/invalid source.obj")
|
||||
t.expect_addition("bin/invalid source.test/$toolset/debug*/invalid source.test")
|
||||
t.expect_addition("bin/valid source.test/$toolset/debug*/valid source.obj")
|
||||
t.expect_addition("bin/valid source.test/$toolset/debug*/valid source.test")
|
||||
|
||||
t.expect_content("bin/valid source.test/$toolset/debug/valid source.test", \
|
||||
t.expect_content("bin/valid source.test/$toolset/debug*/valid source.test", \
|
||||
"passed" )
|
||||
t.expect_content( \
|
||||
"bin/invalid source.test/$toolset/debug/invalid source.test", \
|
||||
"bin/invalid source.test/$toolset/debug*/invalid source.test", \
|
||||
"passed" )
|
||||
t.expect_content( \
|
||||
"bin/invalid source.test/$toolset/debug/invalid source.obj", \
|
||||
"bin/invalid source.test/$toolset/debug*/invalid source.obj", \
|
||||
"failed as expected" )
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -118,15 +118,15 @@ time my-time : my-exe ;
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/aaa.obj")
|
||||
t.expect_addition("bin/$toolset/debug/my-exe.exe")
|
||||
t.expect_addition("bin/$toolset/debug/my-time.time")
|
||||
t.expect_addition("bin/$toolset/debug*/aaa.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/my-exe.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/my-time.time")
|
||||
|
||||
t.expect_content_lines("bin/$toolset/debug/my-time.time",
|
||||
t.expect_content_lines("bin/$toolset/debug*/my-time.time",
|
||||
"user: *[0-9] seconds")
|
||||
t.expect_content_lines("bin/$toolset/debug/my-time.time",
|
||||
t.expect_content_lines("bin/$toolset/debug*/my-time.time",
|
||||
"system: *[0-9] seconds")
|
||||
t.expect_content_lines("bin/$toolset/debug/my-time.time",
|
||||
t.expect_content_lines("bin/$toolset/debug*/my-time.time",
|
||||
"clock: *[0-9] seconds")
|
||||
|
||||
t.cleanup()
|
||||
@@ -156,12 +156,12 @@ time "my time" : "my exe" ;
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/aaa bbb.obj")
|
||||
t.expect_addition("bin/$toolset/debug/my exe.exe")
|
||||
t.expect_addition("bin/$toolset/debug/my time.time")
|
||||
t.expect_addition("bin/$toolset/debug*/aaa bbb.obj")
|
||||
t.expect_addition("bin/$toolset/debug*/my exe.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/my time.time")
|
||||
|
||||
t.expect_content_lines("bin/$toolset/debug/my time.time", "user: *")
|
||||
t.expect_content_lines("bin/$toolset/debug/my time.time", "system: *")
|
||||
t.expect_content_lines("bin/$toolset/debug*/my time.time", "user: *")
|
||||
t.expect_content_lines("bin/$toolset/debug*/my time.time", "system: *")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
|
||||
@@ -31,6 +31,6 @@ helper() {}
|
||||
""")
|
||||
|
||||
t.run_build_system(["link=static"])
|
||||
t.expect_addition("bin/$toolset/debug/link-static/test.passed")
|
||||
t.expect_addition("bin/$toolset/debug/link-static*/test.passed")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -250,7 +250,7 @@ foo() {}
|
||||
""")
|
||||
|
||||
t.run_build_system(["link=static"])
|
||||
t.expect_addition("libs/bin/$toolset/debug/link-static/a_d.obj")
|
||||
t.expect_addition("libs/bin/$toolset/debug/link-static*/a_d.obj")
|
||||
|
||||
|
||||
# Test that indirect conditionals are respected in usage requirements.
|
||||
@@ -278,6 +278,6 @@ foo() {}
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/a.exe")
|
||||
t.expect_addition("bin/$toolset/debug*/a.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user