Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for modular build structure. #318

Merged
merged 23 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f89de28
Make the library modular usable.
grafikrobot Mar 11, 2024
5e07170
Use searched-lib targets for external/OS/Windows libraries to avoid t…
grafikrobot Mar 17, 2024
8053b6d
Use the OS temp dir for creating test dir to avoid putting dirs in ra…
grafikrobot Mar 17, 2024
75b1016
Sync from upstream.
grafikrobot Mar 23, 2024
47b3701
Switch to library requirements instead of source. As source puts extr…
grafikrobot Mar 30, 2024
ec7a66b
Updated dependencies.
grafikrobot Apr 25, 2024
0d91a92
Add missing NO_LIB usage requirements.
grafikrobot Apr 29, 2024
4ecb549
Add missing import-search for cconfig/predef checks.
grafikrobot May 5, 2024
c6ebda8
Add requires-b2 check to top-level build file.
grafikrobot May 5, 2024
d9d199b
Sync from upstream.
grafikrobot May 20, 2024
da0a77c
Bump B2 require to 5.2
grafikrobot Jun 14, 2024
73f773d
Sync from upstream.
grafikrobot Jul 12, 2024
6c95f9c
Change all <source> references to <library>.
grafikrobot Jul 21, 2024
1c1500b
Update copyright dates.
grafikrobot Jul 21, 2024
941fca2
Move inter-lib dependencies to a project variable and into the build …
grafikrobot Jul 24, 2024
d23444a
Split b2 dependencies into public and private.
grafikrobot Jul 26, 2024
e45706c
Undo temp dir for test change.
grafikrobot Jul 26, 2024
9b38ceb
Make winapi dep target-os specific. And remove direct atomic dep as i…
grafikrobot Aug 24, 2024
ca7bc30
Sync from upstream.
grafikrobot Aug 25, 2024
31edfee
Sync from upstream.
grafikrobot Aug 26, 2024
40ac537
Sync from upstream.
grafikrobot Aug 26, 2024
179d4b9
Sync from upstream.
grafikrobot Sep 17, 2024
29b63d9
Remove bug targets from all build as that's not a regular project.
grafikrobot Sep 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright René Ferdinand Rivera Morell 2023
# 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 ;

project /boost/filesystem
: common-requirements
<library>/boost/assert//boost_assert
grafikrobot marked this conversation as resolved.
Show resolved Hide resolved
<library>/boost/atomic//boost_atomic
<library>/boost/config//boost_config
<library>/boost/container_hash//boost_container_hash
<library>/boost/core//boost_core
<library>/boost/detail//boost_detail
<library>/boost/io//boost_io
<library>/boost/iterator//boost_iterator
<library>/boost/predef//boost_predef
<library>/boost/scope//boost_scope
<library>/boost/smart_ptr//boost_smart_ptr
<library>/boost/system//boost_system
<library>/boost/type_traits//boost_type_traits
<library>/boost/winapi//boost_winapi
<include>include
;

explicit
[ alias boost_filesystem : build//boost_filesystem ]
[ alias all : boost_filesystem bug example test ]
grafikrobot marked this conversation as resolved.
Show resolved Hide resolved
;

call-if : boost-library filesystem
: install boost_filesystem
;
12 changes: 6 additions & 6 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -136,7 +137,7 @@ local cxx_requirements = [ requires
cxx11_override
] ;

project boost/filesystem
project
: requirements
<host-os>hpux,<toolset>gcc:<define>_INCLUDE_STDC__SOURCE_199901
[ check-target-builds ../config//has_attribute_init_priority "has init_priority attribute" : <define>BOOST_FILESYSTEM_HAS_INIT_PRIORITY ]
Expand Down Expand Up @@ -175,6 +176,7 @@ project boost/filesystem
: usage-requirements # pass these requirement to dependents (i.e. users)
<link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1
<link>static:<define>BOOST_FILESYSTEM_STATIC_LINK=1
<define>BOOST_FILESYSTEM_NO_LIB=1
grafikrobot marked this conversation as resolved.
Show resolved Hide resolved
;

SOURCES =
Expand Down Expand Up @@ -214,5 +216,3 @@ lib boost_filesystem
: usage-requirements
$(cxx_requirements)
;

boost-install boost_filesystem ;
2 changes: 1 addition & 1 deletion config/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ explicit has_posix_at_apis ;
obj has_fallocate : has_fallocate.cpp : <include>../src ;
explicit has_fallocate ;

lib bcrypt ;
searched-lib bcrypt ;
explicit bcrypt ;

exe has_bcrypt : has_bcrypt.cpp : <include>../src <library>bcrypt ;
Expand Down
4 changes: 2 additions & 2 deletions test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ run operations_test.cpp : : : <link>shared <define>BOOST_FILESYSTEM_VERSION=4 <t
run operations_test.cpp : : : <link>static <define>BOOST_FILESYSTEM_VERSION=4 : operations_test_static ;
run operations_test.cpp : : : <link>shared <define>BOOST_FILESYSTEM_VERSION=3 : operations_test_v3 ;
run operations_unit_test.cpp : $(HERE) : : <link>shared <define>BOOST_FILESYSTEM_VERSION=4 <test-info>always_show_run_output ;
run copy_test.cpp : : : <define>BOOST_FILESYSTEM_VERSION=4 ;
run copy_test.cpp : : : <define>BOOST_FILESYSTEM_VERSION=4 <source>/boost/exception//boost_exception ;
grafikrobot marked this conversation as resolved.
Show resolved Hide resolved
compile-fail cf_path_nullptr_test.cpp ;
compile path_iter_ctor_overload_test.cpp ;
compile path_operator_ambiguity.cpp : <toolset>gcc:<warnings-as-errors>on ;
Expand All @@ -98,7 +98,7 @@ run path_unit_test.cpp : : : <link>shared $(VIS) <define>BOOST_FILESYSTEM_VERSIO
run relative_test.cpp : : : <define>BOOST_FILESYSTEM_VERSION=4 ;
run ../example/simple_ls.cpp : : : <define>BOOST_FILESYSTEM_VERSION=4 ;
run ../example/file_status.cpp : : : <define>BOOST_FILESYSTEM_VERSION=4 ;
run foreach_test.cpp : : : <define>BOOST_FILESYSTEM_VERSION=4 ;
run foreach_test.cpp : : : <define>BOOST_FILESYSTEM_VERSION=4 <source>/boost/foreach//boost_foreach ;

# `quick` target (for CI)
run quick.cpp : : : <define>BOOST_FILESYSTEM_VERSION=4 ;
Expand Down
2 changes: 1 addition & 1 deletion test/deprecated_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ int cpp_main(int /*argc*/, char* /*argv*/[])
de.replace_filename("bar.foo", fs::file_status(), fs::file_status());
BOOST_TEST(de.path() == "bar.foo");

const fs::path temp_dir(fs::current_path() / ".." / fs::unique_path("deprecated_test-%%%%-%%%%-%%%%"));
const fs::path temp_dir(fs::temp_directory_path() / fs::unique_path("deprecated_test-%%%%-%%%%-%%%%"));
grafikrobot marked this conversation as resolved.
Show resolved Hide resolved
std::cout << "temp_dir is " << temp_dir.string() << std::endl;

fs::create_directory(temp_dir);
Expand Down