import property-set ;
import common ;
# This rule is called by Boost.Build to determine the name of
# target. We use it to encode build variant, compiler name and
# boost version in the target name
rule tag ( name : type ? : property-set )
{
if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
{
if $(layout) = versioned
{
local result = [ common.format-name
-$(BOOST_VERSION_TAG)
-$(BUILD_ID)
: $(name) : $(type) : $(property-set) ] ;
# Optionally add version suffix.
# On NT, library with version suffix won't be recognized
# by linkers. On CYGWIN, we get strage duplicate symbol
# errors when library is generated with version suffix.
# On OSX, version suffix is not needed -- the linker expets
# libFoo.1.2.3.dylib format.
# AIX linkers don't accept version suffixes either.
if $(type) = SHARED_LIB &&
! ( [ $(property-set).get ] in windows cygwin darwin aix )
{
result = $(result).$(BOOST_VERSION) ;
}
return $(result) ;
}
else
{
return [ common.format-name
-$(BUILD_ID)
: $(name) : $(type) : $(property-set) ] ;
}
}
}
rule make-name ( properties * )
{
local name = [ tag boost_program_options : SHARED_LIB
: [ property-set.create $(properties) ] ] ;
return $(name:S=) ;
}
searched-lib boost_program_options : : @make-name ;
exe a : a.cpp boost_program_options ;