]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/tools/build/Jamroot.jam
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / tools / build / Jamroot.jam
index 5cf340734f45f3692112224bd590ea5d8caf8eaf..be460547e4f983e9a34195d3bf3899e4c9d7a5f0 100644 (file)
@@ -16,11 +16,16 @@ import indirect ;
 import "class" : new ;
 import type ;
 import virtual-target ;
+import errors ;
 
 path-constant SELF : . ;
 
 project b2
     : build-dir .build
+    : requirements
+        <cxxstd>11
+        <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS=1
+        <toolset>msvc:<define>_CRT_NONSTDC_NO_DEPRECATE=1
     ;
 
 #|
@@ -73,11 +78,13 @@ explicit jamgram.y ;
 Define grammar translation with Bison.
 |#
 
+BISON = [ os.environ BISON ] ;
+BISON ?= bison ;
+local BISON_IN_PATH = [ path.glob [ os.executable-path ] : $(BISON[1]) $(BISON[1]).* ] ;
+
 rule grammar ( target : source : properties * )
 {
     # LOCATE on $(target) = $(source:D) ;
-    local BISON = [ os.environ BISON ] ;
-    BISON ?= bison ;
     BISON on $(target) = $(BISON) ;
 }
 
@@ -86,11 +93,20 @@ actions grammar
     "$(BISON)" --yacc --defines -o "$(<[1])" "$(>)"
 }
 
-make jamgram.cpp
-    :   src/engine/jamgram.y
-    :   @grammar
-    :   <dependency>jamgram.y
-        <location>src/engine ;
+if $(BISON_IN_PATH)
+{
+    make jamgram.cpp
+        :   src/engine/jamgram.y
+        :   @grammar
+        :   <dependency>jamgram.y
+            <location>src/engine ;
+}
+else
+{
+    errors.warning "Bison generator program '$(BISON:J= )' not found. Skipping grammar build." ;
+    alias jamgram.cpp
+        :   src/engine/jamgram.cpp ;
+}
 explicit jamgram.cpp ;
 
 #|
@@ -153,6 +169,7 @@ local b2_src =
     [ glob src/engine/*.cpp src/engine/modules/*.cpp :
         src/engine/*nt.cpp src/engine/*unix.cpp src/engine/*vms.cpp
         src/engine/yyacc.cpp src/engine/mkjambase.cpp
+        src/engine/check_cxx11.cpp
         ] ;
 local b2_src_nt = [ glob src/engine/*nt.cpp ] ;
 local b2_src_unix = [ glob src/engine/*unix.cpp ] ;
@@ -167,6 +184,9 @@ exe b2
         <target-os>$(unix_os):<source>$(b2_src_unix)
         <dependency>jamgram.cpp
         <dependency>jambase.cpp
+        <toolset>msvc:<find-static-library>kernel32
+        <toolset>msvc:<find-static-library>advapi32
+        <toolset>msvc:<find-static-library>user32
     ;
 explicit b2 ;