• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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      <conditional>@select-windows-crypto-api
54    : source-location ../src
55    : usage-requirements # pass these requirement to dependents (i.e. users)
56      <link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1
57      <link>static:<define>BOOST_FILESYSTEM_STATIC_LINK=1
58    ;
59
60SOURCES =
61    codecvt_error_category
62    exception
63    directory
64    operations
65    path
66    path_traits
67    portability
68    unique_path
69    utf8_codecvt_facet
70    windows_file_codecvt
71    ;
72
73lib boost_filesystem
74    : $(SOURCES).cpp
75    : <define>BOOST_FILESYSTEM_SOURCE
76      <include>../src
77      <link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1
78      <link>static:<define>BOOST_FILESYSTEM_STATIC_LINK=1
79    :
80    :
81    ;
82
83boost-install boost_filesystem ;
84