mirror of
https://github.com/boostorg/build.git
synced 2026-02-17 01:32:12 +00:00
Somewhat fix searched libraries.
[SVN r64554]
This commit is contained in:
@@ -26,12 +26,15 @@ class Property(object):
|
||||
|
||||
__slots__ = ('_feature', '_value', '_condition')
|
||||
|
||||
def __init__(self, feature, value, condition = []):
|
||||
assert(feature.free() or value.find(':') == -1)
|
||||
self._feature = feature
|
||||
def __init__(self, f, value, condition = []):
|
||||
if type(f) == type(""):
|
||||
f = feature.get(f)
|
||||
# At present, single property has a single value.
|
||||
assert type(value) != type([])
|
||||
assert(f.free() or value.find(':') == -1)
|
||||
self._feature = f
|
||||
self._value = value
|
||||
self._condition = condition
|
||||
|
||||
|
||||
def feature(self):
|
||||
return self._feature
|
||||
|
||||
@@ -879,7 +879,7 @@ class NullAction (Action):
|
||||
actions which create them.
|
||||
"""
|
||||
def __init__ (self, manager, prop_set):
|
||||
Action.__init__ (self, manager, None, None, prop_set)
|
||||
Action.__init__ (self, manager, [], None, prop_set)
|
||||
|
||||
def actualize (self):
|
||||
if not self.actualized_:
|
||||
|
||||
@@ -46,7 +46,7 @@ t.write("jamfile.jam", """
|
||||
import path ;
|
||||
import project ;
|
||||
|
||||
local here = [ project.attribute $(__name__) location ] ;
|
||||
path-constant here : . ;
|
||||
here = [ path.root $(here) [ path.pwd ] ] ;
|
||||
|
||||
exe main : main.cpp helper ;
|
||||
|
||||
@@ -336,7 +336,7 @@ class SearchedLibTarget (virtual_target.AbstractFileTarget):
|
||||
return self.search_
|
||||
|
||||
def actualize_location (self, target):
|
||||
project.manager ().engine ().add_not_file_target (target)
|
||||
bjam.call("NOTFILE", target)
|
||||
|
||||
def path (self):
|
||||
#FIXME: several functions rely on this not being None
|
||||
@@ -578,19 +578,21 @@ class LinkingGenerator (generators.Generator):
|
||||
generators.Generator.__init__ (self, id, composing, source_types, target_types_and_names, requirements)
|
||||
|
||||
def run (self, project, name, prop_set, sources):
|
||||
|
||||
lib_sources = prop_set.get('<library>')
|
||||
[ sources.append (project.manager().get_object(x)) for x in lib_sources ]
|
||||
sources.extend(lib_sources)
|
||||
|
||||
# Add <library-path> properties for all searched libraries
|
||||
extra = []
|
||||
for s in sources:
|
||||
if s.type () == 'SEARCHED_LIB':
|
||||
search = s.search()
|
||||
extra.append(replace_grist(search, '<library-path>'))
|
||||
extra.extend(property.Property('<library-path>', sp) for sp in search)
|
||||
|
||||
orig_xdll_path = []
|
||||
|
||||
if prop_set.get('<hardcode-dll-paths>') == ['true'] and type.is_derived(self.target_types_ [0], 'EXE'):
|
||||
if prop_set.get('<hardcode-dll-paths>') == ['true'] \
|
||||
and type.is_derived(self.target_types_ [0], 'EXE'):
|
||||
xdll_path = prop_set.get('<xdll-path>')
|
||||
orig_xdll_path = [ replace_grist(x, '<dll-path>') for x in xdll_path ]
|
||||
# It's possible that we have libraries in sources which did not came
|
||||
@@ -670,12 +672,12 @@ class LinkingGenerator (generators.Generator):
|
||||
fst = []
|
||||
for s in sources:
|
||||
if type.is_derived(s.type(), 'SEARCHED_LIB'):
|
||||
name = s.real_name()
|
||||
n = s.real_name()
|
||||
if s.shared():
|
||||
fsa.append(name)
|
||||
fsa.append(n)
|
||||
|
||||
else:
|
||||
fst.append(name)
|
||||
fst.append(n)
|
||||
|
||||
else:
|
||||
sources2.append(s)
|
||||
@@ -685,9 +687,8 @@ class LinkingGenerator (generators.Generator):
|
||||
add.append("<find-shared-library>" + '&&'.join(fsa))
|
||||
if fst:
|
||||
add.append("<find-static-library>" + '&&'.join(fst))
|
||||
|
||||
spawn = generators.Generator.generated_targets(self, sources2,prop_set.add_raw(add), project, name)
|
||||
|
||||
|
||||
spawn = generators.Generator.generated_targets(self, sources2, prop_set.add_raw(add), project, name)
|
||||
return spawn
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user