diff --git a/build.jam b/build.jam new file mode 100644 index 000000000..4e9c055ad --- /dev/null +++ b/build.jam @@ -0,0 +1,32 @@ +# Copyright René Ferdinand Rivera Morell 2023-2024 +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +require-b2 5.2 ; + +constant boost_dependencies : + /boost/assert//boost_assert + /boost/config//boost_config + /boost/container_hash//boost_container_hash + /boost/detail//boost_detail + /boost/io//boost_io + /boost/iterator//boost_iterator + /boost/smart_ptr//boost_smart_ptr + /boost/system//boost_system + /boost/type_traits//boost_type_traits ; + +project /boost/filesystem + : common-requirements + include + ; + +explicit + [ alias boost_filesystem : build//boost_filesystem ] + [ alias all : boost_filesystem example test ] + ; + +call-if : boost-library filesystem + : install boost_filesystem + ; + diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index a37819021..e8b693d6a 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -9,11 +9,12 @@ import project ; import configure ; +import-search /boost/config/checks ; import config : requires ; -lib bcrypt ; -lib advapi32 ; -lib coredll ; +searched-lib bcrypt ; +searched-lib advapi32 ; +searched-lib coredll ; explicit bcrypt advapi32 coredll ; # The rule checks if a config macro is defined in the command line or build properties @@ -136,8 +137,13 @@ local cxx_requirements = [ requires cxx11_override ] ; -project boost/filesystem +project + : common-requirements $(boost_dependencies) : requirements + /boost/core//boost_core + /boost/predef//boost_predef + /boost/scope//boost_scope + windows:/boost/winapi//boost_winapi hpux,gcc:_INCLUDE_STDC__SOURCE_199901 [ check-target-builds ../config//has_attribute_init_priority "has init_priority attribute" : BOOST_FILESYSTEM_HAS_INIT_PRIORITY ] [ check-target-builds ../config//has_stat_st_mtim "has stat::st_blksize" : BOOST_FILESYSTEM_HAS_STAT_ST_BLKSIZE ] @@ -177,6 +183,7 @@ project boost/filesystem : usage-requirements # pass these requirement to dependents (i.e. users) shared:BOOST_FILESYSTEM_DYN_LINK=1 static:BOOST_FILESYSTEM_STATIC_LINK=1 + BOOST_FILESYSTEM_NO_LIB=1 ; SOURCES = @@ -216,5 +223,3 @@ lib boost_filesystem : usage-requirements $(cxx_requirements) ; - -boost-install boost_filesystem ; diff --git a/config/Jamfile.v2 b/config/Jamfile.v2 index 4ca2ced4d..6e9edaaa3 100644 --- a/config/Jamfile.v2 +++ b/config/Jamfile.v2 @@ -36,7 +36,7 @@ explicit has_posix_at_apis ; obj has_fallocate : has_fallocate.cpp : ../src ; explicit has_fallocate ; -lib bcrypt ; +searched-lib bcrypt ; explicit bcrypt ; exe has_bcrypt : has_bcrypt.cpp : ../src bcrypt ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 0ac5e6cc0..3cb99d40b 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -85,7 +85,7 @@ run operations_test.cpp : : : shared BOOST_FILESYSTEM_VERSION=4 static BOOST_FILESYSTEM_VERSION=4 : operations_test_static ; run operations_test.cpp : : : shared BOOST_FILESYSTEM_VERSION=3 : operations_test_v3 ; run operations_unit_test.cpp : $(HERE) : : shared BOOST_FILESYSTEM_VERSION=4 always_show_run_output ; -run copy_test.cpp : : : BOOST_FILESYSTEM_VERSION=4 ; +run copy_test.cpp : : : BOOST_FILESYSTEM_VERSION=4 /boost/exception//boost_exception ; compile-fail cf_path_nullptr_test.cpp ; compile path_iter_ctor_overload_test.cpp ; compile path_operator_ambiguity.cpp : gcc:on ; @@ -98,7 +98,7 @@ run path_unit_test.cpp : : : shared $(VIS) BOOST_FILESYSTEM_VERSIO run relative_test.cpp : : : BOOST_FILESYSTEM_VERSION=4 ; run ../example/simple_ls.cpp : : : BOOST_FILESYSTEM_VERSION=4 ; run ../example/file_status.cpp : : : BOOST_FILESYSTEM_VERSION=4 ; -run foreach_test.cpp : : : BOOST_FILESYSTEM_VERSION=4 ; +run foreach_test.cpp : : : BOOST_FILESYSTEM_VERSION=4 /boost/foreach//boost_foreach ; # `quick` target (for CI) run quick.cpp : : : BOOST_FILESYSTEM_VERSION=4 ;