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. #239

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
11 changes: 0 additions & 11 deletions Jamfile

This file was deleted.

38 changes: 38 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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/algorithm//boost_algorithm
/boost/assert//boost_assert
/boost/config//boost_config
/boost/core//boost_core
/boost/io//boost_io
/boost/lexical_cast//boost_lexical_cast
/boost/numeric_conversion//boost_numeric_conversion
/boost/range//boost_range
/boost/smart_ptr//boost_smart_ptr
/boost/static_assert//boost_static_assert
/boost/throw_exception//boost_throw_exception
/boost/tokenizer//boost_tokenizer
/boost/type_traits//boost_type_traits
/boost/utility//boost_utility
/boost/winapi//boost_winapi ;

project /boost/date_time
: common-requirements
<include>include
;

explicit
[ alias boost_date_time : build//boost_date_time ]
[ alias all : boost_date_time example test ]
;

call-if : boost-library date_time
: install boost_date_time
;

10 changes: 5 additions & 5 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Copyright (c) 2002-2005 CrystalClear Software, Inc.
# Use, modification and distribution is subject to the
# Use, modification and distribution is subject to the
# Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
#
# date_time is now header only -- this file provides a stub for backward compatibility
#


project boost/date_time
project
: common-requirements <library>$(boost_dependencies)
: requirements
<define>DATE_TIME_INLINE
<link>shared:<define>BOOST_ALL_DYN_LINK=1
<link>shared:<define>BOOST_ALL_DYN_LINK=1
: usage-requirements
<define>DATE_TIME_INLINE
<link>shared:<define>BOOST_DATE_TIME_DYN_LINK=1
<define>BOOST_DATE_TIME_NO_LINK=1
: source-location ../src
;

# greg_month.cpp is now just a stub so that there is
# still a boost_date_time library to link for backward compatibility
lib boost_date_time : gregorian/greg_month.cpp ;

boost-install boost_date_time ;
2 changes: 2 additions & 0 deletions doc/build.jam
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

require-b2 5.2 ;

###############################################################################
alias boostdoc
: ../xmldoc/date_time.xml
Expand Down
14 changes: 7 additions & 7 deletions example/Jamfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project libs/date_time/example ;
project : requirements <library>/boost/date_time//boost_date_time ;

exe dates_as_strings : gregorian/dates_as_strings.cpp ;
exe days_alive : gregorian/days_alive.cpp ;
Expand All @@ -18,19 +18,19 @@ exe days_since_year_start : gregorian/days_since_year_start.cpp ;


exe local_utc_conversion : posix_time/local_utc_conversion.cpp
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
;

exe print_hours : posix_time/print_hours.cpp
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
;

exe time_math : posix_time/time_math.cpp
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
;

exe time_periods : posix_time/time_periods.cpp
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
;

exe simple_time_zone : local_time/simple_time_zone.cpp ;
Expand All @@ -41,7 +41,7 @@ exe io_tutorial : tutorial/io_tutorial.cpp ;

# Copyright (c) 2002-2005
# CrystalClear Software, Inc.
# Subject to the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or
# Subject to the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or
# http://www.boost.org/LICENSE_1_0.txt)

39 changes: 20 additions & 19 deletions test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import path ;
import regex ;
import testing ;

project : requirements <library>/boost/date_time//boost_date_time ;

local DATE_TIME_DYNAMIC_PROPERTIES = <define>BOOST_ALL_DYN_LINK <runtime-link>shared <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG <define>BOOST_ALL_NO_LIB ;
local DATE_TIME_PROPERTIES = <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
# FIXME
#std::locale-support
# FIXME
#std::locale-support
<define>BOOST_ALL_NO_LIB ;

# core stuff
Expand Down Expand Up @@ -43,12 +45,12 @@ run gregorian/testparse_date.cpp ;
run gregorian/testperiod.cpp ;

run gregorian/testgreg_serialize.cpp
../../serialization/build//boost_serialization
/boost/serialization//boost_serialization
: : : <define>DATE_TIME_XML_SERIALIZE
: testgreg_serialize_xml ;

run gregorian/testgreg_serialize.cpp
../../serialization/build//boost_serialization
/boost/serialization//boost_serialization
: : :
: testgreg_serialize ;

Expand All @@ -65,7 +67,7 @@ run posix_time/testtime.cpp ;
run posix_time/testmicrosec_time_clock.cpp ;
run posix_time/testgreg_duration_operators.cpp ;
run posix_time/testtime_facet.cpp ;
run posix_time/testtime_input_facet.cpp
run posix_time/testtime_input_facet.cpp
: : : <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
: testtime_input_facet ;

Expand All @@ -75,35 +77,35 @@ run posix_time/testtime_formatters.cpp

# text archive tests
run posix_time/testtime_serialize.cpp
../../serialization/build//boost_serialization
/boost/serialization//boost_serialization
: : :
: testtime_serialize ;

run posix_time/testtime_serialize.cpp
../../serialization/build//boost_serialization
/boost/serialization//boost_serialization
: : : <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
: testtime_serialize_std_config ;

# xml archive tests
run posix_time/testtime_serialize.cpp
../../serialization/build//boost_serialization
/boost/serialization//boost_serialization
: : : <define>DATE_TIME_XML_SERIALIZE <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
: testtime_serialize_xml_std_config ;

run posix_time/testtime_serialize.cpp
../../serialization/build//boost_serialization
/boost/serialization//boost_serialization
: : : <define>DATE_TIME_XML_SERIALIZE
: testtime_serialize_xml ;

# versioning tests
run posix_time/testtime_serialize_versioning.cpp
../../serialization/build//boost_serialization
: : testtime_serialize_versioning_prev
/boost/serialization//boost_serialization
: : testtime_serialize_versioning_prev
: <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
: testtime_serialize_versioning_curr ;

run posix_time/testtime_serialize_versioning.cpp
../../serialization/build//boost_serialization
/boost/serialization//boost_serialization
: : : <define>BOOST_DATE_TIME_POSIX_TIME_DURATION_VERSION=0
: testtime_serialize_versioning_prev ;

Expand All @@ -124,7 +126,7 @@ run local_time/testlocal_time.cpp ;
run local_time/testlocal_time_iterator.cpp ;
run local_time/testlocal_time_period.cpp ;

run local_time/testtz_database.cpp
run local_time/testtz_database.cpp
: : ../data/date_time_zonespec.csv local_time/poorly_formed_zonespec.csv
: ;
run local_time/testlocal_time_facet.cpp
Expand All @@ -137,17 +139,16 @@ run local_time/testclocks.cpp ;
#{
# local DATE_TIME_PROPERTIES = <define>BOOST_ALL_NO_LIB <define>USE_DATE_TIME_PRE_1_33_FACET_IO
# # FIXME
# # std::locale-support toolset::require-boost-spirit-support
# # std::locale-support toolset::require-boost-spirit-support
# ;

# Iterate over all public headers and generate a self-contained header test to check for any missing includes
# and basic syntax errors.
if ! [ os.environ BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS ]
{
local headers_path = [ path.make $(BOOST_ROOT)/libs/date_time/include/boost ] ;
for file in [ path.glob-tree $(headers_path) : *.hpp ]
for file in [ glob-tree-ex ../include/boost : *.hpp ]
{
local rel_file = [ path.relative-to $(headers_path) $(file) ] ;
local rel_file = [ path.relative-to ../include/boost $(file) ] ;
# Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end.
# All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes.
local test_name = [ regex.replace ~hdr/$(rel_file) "/" "-" ] ;
Expand All @@ -159,8 +160,8 @@ if ! [ os.environ BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS ]

# Copyright (c) 2000-2020
# CrystalClear Software, Inc.
# Subject to the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or
# Subject to the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or
# http://www.boost.org/LICENSE_1_0.txt)


Expand Down
48 changes: 24 additions & 24 deletions xmldoc/Jamfile.v2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) 2002-2006 CrystalClear Software, Inc.
# Use, modification and distribution is subject to the
# Use, modification and distribution is subject to the
# Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
#
Expand All @@ -9,7 +9,7 @@ import set ;
using boostbook ;
using doxygen ;

boostbook date_time : date_time.xml
boostbook date_time : date_time.xml
:
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
<dependency>date_time_autodoc
Expand All @@ -21,57 +21,57 @@ boostbook date_time : date_time.xml

# boostbook date_time_doc : exclusive_date_time.xml ;

# file lists take the form of [ set.difference [ glob include/these ] : [ glob but/not/these ] ]
# file lists take the form of [ set.difference [ glob include/these ] : [ glob but/not/these ] ]

local date_time_files = [ glob ../../../boost/date_time/*.hpp ] ;
local date_time_files = [ glob ../include/boost/date_time/*.hpp ] ;

# local date_time_files = [ set.difference
# [ glob ../../../boost/date_time/*.hpp ] :
# [ glob ../../../boost/date_time/testfrmwk.hpp
# # ../../../boost/date_time/time_zone_base.hpp
# # ../../../boost/date_time/time_zone_names.hpp
# # ../../../boost/date_time/tz_db_base.hpp
# # ../../../boost/date_time/dst_transition_generators.hpp
# ]
# local date_time_files = [ set.difference
# [ glob ../include/boost/date_time/*.hpp ] :
# [ glob ../include/boost/date_time/testfrmwk.hpp
# # ../../../boost/date_time/time_zone_base.hpp
# # ../../../boost/date_time/time_zone_names.hpp
# # ../../../boost/date_time/tz_db_base.hpp
# # ../../../boost/date_time/dst_transition_generators.hpp
# ]
# ] ;

local gregorian_files = [ set.difference
[ glob ../../../boost/date_time/gregorian/*.hpp ] :
[ glob ../../../boost/date_time/gregorian/event_schedule.hpp ]
local gregorian_files = [ set.difference
[ glob ../include/boost/date_time/gregorian/*.hpp ] :
[ glob ../include/boost/date_time/gregorian/event_schedule.hpp ]
] ;

#ECHO $(date_time_files) ; # useful for debugging

# to build the autodoc files, run bjam --v2 autodoc_target. copy generated
# file from bin.v2 dir to here. run ref_tag_fix.pl.

doxygen date_time_autodoc :
$(date_time_files) :
<doxygen:param>ENABLE_PREPROCESSING=NO
doxygen date_time_autodoc :
$(date_time_files) :
<doxygen:param>ENABLE_PREPROCESSING=NO
<xsl:param>boost.doxygen.reftitle="Date Time Reference"
<doxygen.doxproc.title>"Date Time Reference"
<doxygen.doxproc.id>"date_time_reference"
;

doxygen gregorian_autodoc :
$(gregorian_files) :
<doxygen:param>ENABLE_PREPROCESSING=NO
$(gregorian_files) :
<doxygen:param>ENABLE_PREPROCESSING=NO
<xsl:param>boost.doxygen.reftitle="Gregorian Reference"
<doxygen.doxproc.title>"Gregorian Reference"
<doxygen.doxproc.id>"gregorian_reference"
;

doxygen posix_time_autodoc :
[ glob ../../../boost/date_time/posix_time/*.hpp ] :
<doxygen:param>ENABLE_PREPROCESSING=NO
[ glob ../include/boost/date_time/posix_time/*.hpp ] :
<doxygen:param>ENABLE_PREPROCESSING=NO
<xsl:param>boost.doxygen.reftitle="Posix Time Reference"
<doxygen.doxproc.title>"Posix Time Reference"
<doxygen.doxproc.id>"posix_time_reference"
;

doxygen local_time_autodoc :
[ glob ../../../boost/date_time/local_time/*.hpp ] :
<doxygen:param>ENABLE_PREPROCESSING=NO
[ glob ../include/boost/date_time/local_time/*.hpp ] :
<doxygen:param>ENABLE_PREPROCESSING=NO
<xsl:param>boost.doxygen.reftitle="Local Time Reference"
<doxygen.doxproc.title>"Local Time Reference"
<doxygen.doxproc.id>"local_time_reference"
Expand Down
Loading