Pārlūkot izejas kodu

Support additional tagging of binaries by Python version.

Vladimir Prus 9 gadi atpakaļ
vecāks
revīzija
235330995e
2 mainītis faili ar 18 papildinājumiem un 0 dzēšanām
  1. 5 0
      Jamroot
  2. 13 0
      boostcpp.jam

+ 5 - 0
Jamroot

@@ -182,6 +182,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

+ 13 - 0
boostcpp.jam

@@ -163,6 +163,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) ] ;
+}
 
 ################################################################################
 #

粤ICP备19079148号