mirror of
https://github.com/boostorg/build.git
synced 2026-02-14 12:42:11 +00:00
Merge pull request #154 from fwyzard/fix-library-link-check
Do not reuse the same target for different library link checks
This commit is contained in:
@@ -76,14 +76,6 @@ rule construct-library ( name : property-set : provided-path ? )
|
||||
rule find-library ( properties : names + : provided-path ? )
|
||||
{
|
||||
local result ;
|
||||
if ! $(.main.cpp)
|
||||
{
|
||||
local a = [ class.new action : ac.generate-main :
|
||||
[ property-set.empty ] ] ;
|
||||
.main.cpp = [ virtual-target.register
|
||||
[ class.new file-target main.cpp exact
|
||||
: CPP : $(.project) : $(a) ] ] ;
|
||||
}
|
||||
if [ $(properties).get <link> ] = shared
|
||||
{
|
||||
link-opts = <link>shared <link>static ;
|
||||
@@ -100,8 +92,12 @@ rule find-library ( properties : names + : provided-path ? )
|
||||
{
|
||||
local name = $(names-iter[1]) ;
|
||||
local lib = [ construct-library $(name) : $(properties) : $(provided-path) ] ;
|
||||
local a = [ class.new action : ac.generate-main :
|
||||
[ property-set.empty ] ] ;
|
||||
local main.cpp = [ virtual-target.register
|
||||
[ class.new file-target main-$(name).cpp exact : CPP : $(.project) : $(a) ] ] ;
|
||||
local test = [ generators.construct $(.project) $(name) : EXE
|
||||
: [ $(properties).add $(lib[1]) ] : $(.main.cpp) $(lib[2-])
|
||||
: [ $(properties).add $(lib[1]) ] : $(main.cpp) $(lib[2-])
|
||||
: true ] ;
|
||||
local jam-targets ;
|
||||
for t in $(test[2-])
|
||||
|
||||
Reference in New Issue
Block a user