1# Boost Filesystem Library Build Jamfile 2 3# (C) Copyright Beman Dawes 2002-2006 4# (C) Copyright Andrey Semashev 2020 5# Distributed under the Boost Software License, Version 1.0. 6# See www.boost.org/LICENSE_1_0.txt 7 8# See library home page at http://www.boost.org/libs/filesystem 9 10import project ; 11import configure ; 12 13lib bcrypt ; 14lib advapi32 ; 15lib coredll ; 16explicit bcrypt advapi32 coredll ; 17 18# The rule checks we're building for Windows and selects crypto API to be used 19rule select-windows-crypto-api ( properties * ) 20{ 21 local result ; 22 23 if <target-os>windows in $(properties) || <target-os>cygwin in $(properties) 24 { 25 if [ configure.builds ../config//has_bcrypt : $(properties) : "has BCrypt API" ] 26 { 27 result = <define>BOOST_FILESYSTEM_HAS_BCRYPT <library>bcrypt ; 28 } 29 else 30 { 31 result = <define>BOOST_FILESYSTEM_HAS_WINCRYPT ; 32 if [ configure.builds ../config//is_windows_ce : $(properties) : "is Windows CE" ] 33 { 34 result += <library>coredll ; 35 } 36 else 37 { 38 result += <library>advapi32 ; 39 } 40 } 41 } 42 43 #ECHO Result: $(result) ; 44 return $(result) ; 45} 46 47project boost/filesystem 48 : requirements 49 <host-os>hpux,<toolset>gcc:<define>_INCLUDE_STDC__SOURCE_199901 50 [ check-target-builds ../config//has_stat_st_mtim "has stat::st_mtim" : <define>BOOST_FILESYSTEM_HAS_STAT_ST_MTIM ] 51 [ check-target-builds ../config//has_stat_st_mtimensec "has stat::st_mtimensec" : <define>BOOST_FILESYSTEM_HAS_STAT_ST_MTIMENSEC ] 52 [ check-target-builds ../config//has_stat_st_mtimespec "has stat::st_mtimespec" : <define>BOOST_FILESYSTEM_HAS_STAT_ST_MTIMESPEC ] 53 [ check-target-builds ../config//has_stat_st_birthtim "has stat::st_birthtim" : <define>BOOST_FILESYSTEM_HAS_STAT_ST_BIRTHTIM ] 54 [ check-target-builds ../config//has_stat_st_birthtimensec "has stat::st_birthtimensec" : <define>BOOST_FILESYSTEM_HAS_STAT_ST_BIRTHTIMENSEC ] 55 [ check-target-builds ../config//has_stat_st_birthtimespec "has stat::st_birthtimespec" : <define>BOOST_FILESYSTEM_HAS_STAT_ST_BIRTHTIMESPEC ] 56 [ check-target-builds ../config//has_statx "has statx" : <define>BOOST_FILESYSTEM_HAS_STATX ] 57 [ check-target-builds ../config//has_statx_syscall "has statx syscall" : <define>BOOST_FILESYSTEM_HAS_STATX_SYSCALL ] 58 <conditional>@select-windows-crypto-api 59 : source-location ../src 60 : usage-requirements # pass these requirement to dependents (i.e. users) 61 <link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1 62 <link>static:<define>BOOST_FILESYSTEM_STATIC_LINK=1 63 ; 64 65SOURCES = 66 codecvt_error_category 67 exception 68 directory 69 operations 70 path 71 path_traits 72 portability 73 unique_path 74 utf8_codecvt_facet 75 windows_file_codecvt 76 ; 77 78lib boost_filesystem 79 : $(SOURCES).cpp 80 : <define>BOOST_FILESYSTEM_SOURCE 81 <include>../src 82 <link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1 83 <link>static:<define>BOOST_FILESYSTEM_STATIC_LINK=1 84 : 85 : 86 ; 87 88boost-install boost_filesystem ; 89