diff --git a/Jamroot b/Jamroot index 7ed45cf..4b2778a 100644 --- a/Jamroot +++ b/Jamroot @@ -186,6 +186,11 @@ rule tag ( name : type ? : property-set ) return [ boostcpp.tag $(name) : $(type) : $(property-set) ] ; } +rule python-tag ( name : type ? : property-set ) +{ + return [ boostcpp.python-tag $(name) : $(type) : $(property-set) ] ; +} + rule handle-static-runtime ( properties * ) { # Using static runtime with shared libraries is impossible on Linux, and diff --git a/boostcpp.jam b/boostcpp.jam index 7d7f941..3e728f5 100644 --- a/boostcpp.jam +++ b/boostcpp.jam @@ -162,6 +162,19 @@ rule tag ( name : type ? : property-set ) } } +# Specialized tag function to use for libraries linking to Python. +# Appends value of --python-buildid if provided. +rule python-tag ( name : type ? : property-set ) +{ + local result = $(name) ; + if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB && $(PYTHON_ID) + { + result = $(result)-$(PYTHON_ID) ; + } + + # forward to the boost tagging rule + return [ tag $(result) : $(type) : $(property-set) ] ; +} ################################################################################ #