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

Merged
merged 25 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d66704c
Make the library modular usable.
grafikrobot Mar 11, 2024
01a9647
Sync from upstream.
grafikrobot Mar 16, 2024
3c42d5f
Add missing modular build.jam. And fix gitignore that caused it to be…
grafikrobot Mar 17, 2024
a1af530
Sync from upstream.
grafikrobot Mar 23, 2024
21da1f1
Switch to library requirements instead of source. As source puts extr…
grafikrobot Mar 30, 2024
e3b7adf
Sync from upstream.
grafikrobot Apr 10, 2024
b6c0d60
Remove relative references to boost-root in Jamfiles.
grafikrobot Apr 13, 2024
4ff95c6
Building docs requires Python.
grafikrobot Apr 24, 2024
526a2b5
Sync from upstream.
grafikrobot Apr 25, 2024
2a68f35
Add requires-b2 check to top-level build file.
grafikrobot May 5, 2024
e4891f0
Sync from upstream.
grafikrobot May 12, 2024
0782ce0
Sync from upstream.
grafikrobot May 30, 2024
8a79387
Bump B2 require to 5.2
grafikrobot Jun 14, 2024
50d6147
Sync from upstream.
grafikrobot Jul 12, 2024
14725ce
Change all <source> references to <library>.
grafikrobot Jul 21, 2024
6803f27
Fix library global (relative) references.
grafikrobot Jul 21, 2024
f1b9beb
Move inter-lib dependencies to a project variable and into the build …
grafikrobot Jul 24, 2024
ae3198f
Re-enable some examples that got accidentally disabled.
grafikrobot Jul 24, 2024
9eaddc0
Sync from upstream.
grafikrobot Jul 25, 2024
9e82721
Switch to /boost/test//included target for header only mode of Boost.…
grafikrobot Jul 26, 2024
0fecf4c
Sync from upstream.
grafikrobot Aug 2, 2024
2ad067a
Update build deps.
grafikrobot Aug 3, 2024
4234d41
Sync from upstream.
grafikrobot Aug 9, 2024
f44ff62
Change math dep real target math/tr1.
grafikrobot Aug 11, 2024
80f60c6
Update build deps.
grafikrobot Aug 14, 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ stdcerr

# JetBrains
/.idea

!build.jam
26 changes: 0 additions & 26 deletions Jamfile

This file was deleted.

63 changes: 63 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright René Ferdinand Rivera Morell 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 ;

import-search /boost/config/checks ;
import config : requires ;

constant boost_dependencies :
/boost/algorithm//boost_algorithm
/boost/any//boost_any
/boost/array//boost_array
/boost/assert//boost_assert
/boost/concept_check//boost_concept_check
/boost/config//boost_config
/boost/container//boost_container
/boost/core//boost_core
/boost/endian//boost_endian
/boost/function_types//boost_function_types
/boost/fusion//boost_fusion
/boost/integer//boost_integer
/boost/iterator//boost_iterator
/boost/lexical_cast//boost_lexical_cast
/boost/math//boost_math_tr1
/boost/mpl//boost_mpl
/boost/multiprecision//boost_multiprecision
/boost/numeric_conversion//boost_numeric_conversion
/boost/polygon//boost_polygon
/boost/predef//boost_predef
/boost/qvm//boost_qvm
/boost/range//boost_range
/boost/rational//boost_rational
/boost/serialization//boost_serialization
/boost/static_assert//boost_static_assert
/boost/thread//boost_thread
/boost/throw_exception//boost_throw_exception
/boost/tokenizer//boost_tokenizer
/boost/tuple//boost_tuple
/boost/type_traits//boost_type_traits
/boost/variant//boost_variant
/boost/variant2//boost_variant2 ;

project /boost/geometry
: common-requirements
<include>include
: requirements
[ requires
cxx14_constexpr
cxx14_return_type_deduction
]
<toolset>msvc:<asynch-exceptions>on
;

explicit
[ alias boost_geometry : : : : <library>$(boost_dependencies) ]
[ alias all : boost_geometry test example doc/src/examples index extensions ]
;

call-if : boost-library geometry
;

7 changes: 4 additions & 3 deletions doc/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
project geometry/doc ;

# Auto-index, experimental. Commented otherwise does not build without.
#using auto-index ;
#using auto-index ;
using quickbook ;
using python ;

path-constant here : . ;
path-constant images_location : html ;
Expand All @@ -29,7 +30,7 @@ testing.make-test run-pyd :
make_qbk ;
explicit make_qbk ;

boostbook geometry
boostbook geometry
: geometry.qbk
: <dependency>Jamfile
<dependency>quickref.xml
Expand All @@ -47,7 +48,7 @@ boostbook geometry
<xsl:param>boost.root=../../../..
<quickbook-define>enable_index
<include>$(here)
<format>pdf:<xsl:param>img.src.path=$(images_location)/
<format>pdf:<xsl:param>img.src.path=$(images_location)/
<dependency>make_qbk
;

Expand Down
2 changes: 1 addition & 1 deletion doc/src/docutils/tools/doxygen_xml2qbk/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ project doxygen_xml2qbk
: requirements
<include>.
<include>$(RAPIDXML)
<library>../../../../../../program_options/build//boost_program_options
<library>/boost/program_options//boost_program_options
<link>static
;

Expand Down
5 changes: 3 additions & 2 deletions doc/src/examples/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@


project boost-geometry-doc-src-example
: # requirements
: requirements
<library>/boost/geometry//boost_geometry
;

exe quick_start : quick_start.cpp ;

build-project algorithms ;
build-project core ;
build-project geometries ;
Expand Down
4 changes: 3 additions & 1 deletion doc/src/examples/algorithms/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@


project boost-geometry-doc-example-algorithms
: # requirements
: requirements
<library>/boost/assign//boost_assign
<library>/boost/foreach//boost_foreach
;

exe append : append.cpp ;
Expand Down
2 changes: 1 addition & 1 deletion doc/src/examples/core/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ exe interior_type : interior_type.cpp ;
exe point_type : point_type.cpp ;
exe ring_type : ring_type.cpp ;
exe rings : rings.cpp ;
exe tag : tag.cpp ;
exe tag : tag.cpp : <library>/boost/assign//boost_assign ;
exe tag_cast : tag_cast.cpp ;
3 changes: 2 additions & 1 deletion doc/src/examples/geometries/adapted/boost_range/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@


project boost-geometry-doc-src-example-geometries-adapted-boost_range
: # requirements
: requirements
<library>/boost/assign//boost_assign
;

exe filtered : filtered.cpp ;
Expand Down
10 changes: 6 additions & 4 deletions example/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
# http://www.boost.org/LICENSE_1_0.txt)


project boost-geometry-example
: # requirements
project boost-geometry-example
: requirements
<library>/boost/geometry//boost_geometry
<library>/boost/foreach//boost_foreach
;

exe 01_point_example : 01_point_example.cpp ;
Expand All @@ -21,8 +23,8 @@ exe 05_a_overlay_polygon_example : 05_a_overlay_polygon_example.cpp ;
exe 05_b_overlay_linestring_polygon_example : 05_b_overlay_linestring_polygon_example.cpp ;
exe 06_a_transformation_example : 06_a_transformation_example.cpp ;
exe 06_b_transformation_example : 06_b_transformation_example.cpp ;
exe 07_a_graph_route_example : 07_a_graph_route_example.cpp ;
exe 07_b_graph_route_example : 07_b_graph_route_example.cpp ;
exe 07_a_graph_route_example : 07_a_graph_route_example.cpp : <library>/boost/graph//boost_graph ;
exe 07_b_graph_route_example : 07_b_graph_route_example.cpp : <library>/boost/graph//boost_graph ;

exe c01_custom_point_example : c01_custom_point_example.cpp ;
exe c02_custom_box_example : c02_custom_box_example.cpp ;
Expand Down
2 changes: 2 additions & 0 deletions extensions/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ project boost-geometry-extensions
:
requirements
<toolset>msvc:<asynch-exceptions>on
<library>/boost/geometry//boost_geometry
<library>/boost/test//included
;

build-project test ;
Expand Down
2 changes: 0 additions & 2 deletions extensions/example/gis/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
project boost-geometry-extensions-gis-examples
:
requirements
<include>.
<include>../../../../../boost
<toolset>gcc:<cxxflags>-pedantic
;

Expand Down
3 changes: 2 additions & 1 deletion extensions/example/gis/projections/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@


project boost-geometry-example-extensions-gis-latlong
: # requirements
: requirements
<library>/boost/foreach//boost_foreach
;

exe p01_projection_example : p01_projection_example.cpp ;
Expand Down
4 changes: 4 additions & 0 deletions extensions/test/gis/io/wkb/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

project : requirements
<library>/boost/assign//boost_assign
<library>/boost/algorithm//boost_algorithm ;

test-suite boost-geometry-extensions-gis-io-wkb
:
[ run read_wkb.cpp ]
Expand Down
1 change: 1 addition & 0 deletions index/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
project boost-geometry-index
:
requirements
<library>/boost/geometry//boost_geometry
<toolset>msvc:<asynch-exceptions>on
;

Expand Down
12 changes: 6 additions & 6 deletions index/example/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import os ;

project boost-geometry-index-example
: requirements
<implicit-dependency>/boost//headers
<library>/boost/foreach//boost_foreach
;

local GLUT_ROOT = [ os.environ GLUT_ROOT ] ;
Expand All @@ -44,11 +44,11 @@ if $(GLUT_ROOT)
}

exe random_test : random_test.cpp ;
link serialize.cpp /boost//serialization : ;
link benchmark.cpp /boost//chrono : <threading>multi ;
link benchmark2.cpp /boost//chrono : <threading>multi ;
link benchmark3.cpp /boost//chrono : <threading>multi ;
link benchmark_experimental.cpp /boost//chrono : <threading>multi ;
link serialize.cpp /boost/serialization//boost_serialization /boost/timer//boost_timer : ;
link benchmark.cpp /boost/chrono//boost_chrono : <threading>multi ;
link benchmark2.cpp /boost/chrono//boost_chrono : <threading>multi ;
link benchmark3.cpp /boost/chrono//boost_chrono : <threading>multi ;
link benchmark_experimental.cpp /boost/chrono//boost_chrono : <threading>multi ;
if $(GLUT_ROOT)
{
link glut_vis.cpp glut ;
Expand Down
1 change: 1 addition & 0 deletions index/test/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ project boost-geometry-index-test
<toolset>msvc:<cxxflags>/bigobj
<host-os>windows,<toolset>intel:<cxxflags>/bigobj
<library>/boost/timer//boost_timer
<library>/boost/test//included
;

test-suite boost-geometry-index-detail
Expand Down
1 change: 1 addition & 0 deletions index/test/rtree/interprocess/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rule test_all
<toolset>msvc:<cxxflags>/bigobj
<target-os>windows,<toolset>intel:<cxxflags>/bigobj
<target-os>linux:<linkflags>"-lrt"
<library>/boost/interprocess//boost_interprocess
] ;
}

Expand Down
6 changes: 5 additions & 1 deletion test/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ import testing ;
project boost-geometry-test
:
requirements
<library>/boost/geometry//boost_geometry
<include>.
<toolset>msvc:<asynch-exceptions>on
<toolset>msvc:<cxxflags>/bigobj
<toolset>clang:<cxxflags>-Wno-unneeded-internal-declaration # supress warning by Boost.None
<toolset>intel:<define>BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE
<host-os>windows,<toolset>intel:<cxxflags>/bigobj
<library>/boost/test//included
<library>/boost/foreach//boost_foreach
<library>/boost/assign//boost_assign
;

# Run minimal testset
Expand All @@ -37,7 +41,7 @@ if ! [ os.environ TRAVIS ]
{

build-project core ;
build-project concepts ;
build-project concepts ;
build-project geometries ;
build-project arithmetic ;
build-project algorithms ;
Expand Down
6 changes: 4 additions & 2 deletions test/headers/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import os ;
import path ;
import regex ;

path-constant HEADERS : ../../include/boost/geometry ;

rule generate_self_contained_headers ( headers_subpath )
{
# This rule is based on script copied from similar rule in Boost.GIL
Expand All @@ -29,7 +31,7 @@ rule generate_self_contained_headers ( headers_subpath )
# NOTE: All '/' in test names are replaced with '-' because apparently
# test scripts have a problem with test names containing slashes.

local top_headers_path = [ path.make $(BOOST_ROOT)/libs/geometry/include/boost/geometry ] ;
local top_headers_path = [ path.make $(HEADERS) ] ;

# Skip the OpenGL visualization related header
for local file in [ path.glob-tree $(top_headers_path)/$(headers_subpath) : *.hpp : gl_draw.hpp ]
Expand All @@ -38,7 +40,7 @@ rule generate_self_contained_headers ( headers_subpath )
local target_name = [ regex.replace h/$(rel_file) "/" "-" ] ;
local target_name = [ regex.replace $(target_name) "\.hpp" "" ] ;
targets += [
compile $(BOOST_ROOT)/libs/geometry/test/headers/main.cpp
compile main.cpp
: <define>"BOOST_GEOMETRY_TEST_HEADER=$(rel_file)" <dependency>$(file)
: $(target_name)
] ;
Expand Down
2 changes: 1 addition & 1 deletion test/robustness/convex_hull/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
project random_multi_points
: requirements
<include>.
<library>../../../../program_options/build//boost_program_options
<library>/boost/program_options//boost_program_options
<link>static
;

Expand Down
2 changes: 1 addition & 1 deletion test/robustness/overlay/buffer/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ project recursive_polygons_buffer
: requirements
<include>.
<include>../..
<library>../../../../../program_options/build//boost_program_options
<library>/boost/program_options//boost_program_options
<link>static
;

Expand Down
2 changes: 1 addition & 1 deletion test/robustness/overlay/linear_areal/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ project recursive_polygons_linear_areal
: requirements
<include>.
<include>../..
<library>../../../../../program_options/build//boost_program_options
<library>/boost/program_options//boost_program_options
<link>static
;

Expand Down
Loading