diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-10-30 23:42:11 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-10-30 23:42:11 +0400 |
commit | b6b2e35190833ed36bfcfb6291a5827be5284bf5 (patch) | |
tree | 13f106c15a409908f84ee88986299b9356f2234b /jam-files/sanity.jam | |
parent | 4b98b0937cfcf8932b8cad2822dc01f9562353fd (diff) |
Change test_lib to obey --static
Diffstat (limited to 'jam-files/sanity.jam')
-rw-r--r-- | jam-files/sanity.jam | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/jam-files/sanity.jam b/jam-files/sanity.jam index ab126c9fb..e15bfb2b7 100644 --- a/jam-files/sanity.jam +++ b/jam-files/sanity.jam @@ -46,8 +46,19 @@ rule test_header ( name ) { return [ test_flags "-include $(name)" ] ; } +requirements = ; + +FORCE-STATIC = [ option.get "static" : : "yes" ] ; +if $(FORCE-STATIC) { + requirements += <link>static <runtime-link>static ; +} + rule test_library ( name ) { - return [ test_flags "-l$(name)" ] ; + if $(FORCE-STATIC) { + return [ test_flags "-l$(name) -static" ] ; + } else { + return [ test_flags "-l$(name)" ] ; + } } { @@ -59,13 +70,6 @@ rule test_library ( name ) { constant CLEANING : $(cleaning) ; } -requirements = ; - -FORCE-STATIC = [ option.get "static" : : "yes" ] ; -if $(FORCE-STATIC) { - requirements += <link>static <runtime-link>static ; -} - #Determine if a library can be compiled statically. rule auto-shared ( name : additional * ) { additional ?= "" ; |