Skip to content

Commit

Permalink
Make the library modular usable.
Browse files Browse the repository at this point in the history
  • Loading branch information
grafikrobot authored and Flamefire committed Aug 26, 2024
1 parent 84d91b3 commit 9277c65
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 32 deletions.
26 changes: 26 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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)

import project ;

project /boost/locale
: common-requirements
<source>/boost/assert//boost_assert
<source>/boost/config//boost_config
<source>/boost/core//boost_core
<source>/boost/iterator//boost_iterator
<source>/boost/predef//boost_predef
<source>/boost/thread//boost_thread
<include>include
;

explicit
[ alias boost_locale : build//boost_locale ]
[ alias all : boost_locale test ]
;

call-if : boost-library locale
: install boost_locale
;
62 changes: 31 additions & 31 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import toolset ;

path-constant TOP : .. ;

project /boost/locale
project
: source-location $(TOP)/src/boost/locale
;

Expand Down Expand Up @@ -46,7 +46,7 @@ explicit has_iconv ;
ICONV_PATH = [ modules.peek : ICONV_PATH ] ;

# There may also be an external iconv library
lib iconv :
searched-lib iconv :
: <search>$(ICONV_PATH)/lib <link>shared <runtime-link>shared
: : <include>$(ICONV_PATH)/include
;
Expand Down Expand Up @@ -127,54 +127,54 @@ if [ modules.peek : ICU_ICUIN_NAME ]

if $(ICU_ICUUC_NAME)
{
lib icuuc : : <name>$(ICU_ICUUC_NAME) <conditional>@path_options ;
searched-lib icuuc : : <name>$(ICU_ICUUC_NAME) <conditional>@path_options ;
debug-message Using "$(ICU_ICUUC_NAME)" for library "icuuc" ;
}
else
{
lib icuuc : : <runtime-link>shared <conditional>@path_options ;
lib icuuc : : <toolset>msvc <variant>debug <name>icuucd <runtime-link>shared <conditional>@path_options ;
lib icuuc : : <toolset>intel <target-os>windows <variant>debug <name>icuucd <runtime-link>shared <conditional>@path_options ;
lib icuuc : : <name>sicuuc <runtime-link>static <conditional>@path_options ;
lib icuuc : : <toolset>msvc <variant>debug <name>sicuucd <runtime-link>static <conditional>@path_options ;
lib icuuc : : <toolset>intel <target-os>windows <variant>debug <name>sicuucd <runtime-link>static <conditional>@path_options ;
lib icuuc : : <name>this_is_an_invalid_library_name ;
searched-lib icuuc : : <runtime-link>shared <conditional>@path_options ;
searched-lib icuuc : : <toolset>msvc <variant>debug <name>icuucd <runtime-link>shared <conditional>@path_options ;
searched-lib icuuc : : <toolset>intel <target-os>windows <variant>debug <name>icuucd <runtime-link>shared <conditional>@path_options ;
searched-lib icuuc : : <name>sicuuc <runtime-link>static <conditional>@path_options ;
searched-lib icuuc : : <toolset>msvc <variant>debug <name>sicuucd <runtime-link>static <conditional>@path_options ;
searched-lib icuuc : : <toolset>intel <target-os>windows <variant>debug <name>sicuucd <runtime-link>static <conditional>@path_options ;
searched-lib icuuc : : <name>this_is_an_invalid_library_name ;
}

if $(ICU_ICUDT_NAME)
{
lib icudt : : <name>$(ICU_ICUDT_NAME) <conditional>@path_options ;
searched-lib icudt : : <name>$(ICU_ICUDT_NAME) <conditional>@path_options ;
debug-message Using "$(ICU_ICUDT_NAME)" for library "icudt" ;
}
else
{
lib icudt : : <name>icudata <runtime-link>shared <conditional>@path_options ;
lib icudt : : <name>icudt <toolset>msvc <runtime-link>shared <conditional>@path_options ;
lib icudt : : <name>icudt <toolset>intel <target-os>windows <runtime-link>shared <conditional>@path_options ;
lib icudt : : <name>sicudata <runtime-link>static <conditional>@path_options ;
lib icudt : : <name>sicudt <toolset>msvc <runtime-link>static <conditional>@path_options ;
lib icudt : : <name>sicudt <toolset>intel <target-os>windows <runtime-link>static <conditional>@path_options ;
lib icudt : : <name>this_is_an_invalid_library_name ;
searched-lib icudt : : <name>icudata <runtime-link>shared <conditional>@path_options ;
searched-lib icudt : : <name>icudt <toolset>msvc <runtime-link>shared <conditional>@path_options ;
searched-lib icudt : : <name>icudt <toolset>intel <target-os>windows <runtime-link>shared <conditional>@path_options ;
searched-lib icudt : : <name>sicudata <runtime-link>static <conditional>@path_options ;
searched-lib icudt : : <name>sicudt <toolset>msvc <runtime-link>static <conditional>@path_options ;
searched-lib icudt : : <name>sicudt <toolset>intel <target-os>windows <runtime-link>static <conditional>@path_options ;
searched-lib icudt : : <name>this_is_an_invalid_library_name ;
}

if $(ICU_ICUIN_NAME)
{
lib icuin : : <name>$(ICU_ICUIN_NAME) <conditional>@path_options ;
searched-lib icuin : : <name>$(ICU_ICUIN_NAME) <conditional>@path_options ;
debug-message Using "$(ICU_ICUIN_NAME)" for library "icuin" ;
}
else
{
lib icuin : : <name>icui18n <runtime-link>shared <conditional>@path_options ;
lib icuin : : <toolset>msvc <variant>debug <name>icuind <runtime-link>shared <conditional>@path_options ;
lib icuin : : <toolset>msvc <name>icuin <runtime-link>shared <conditional>@path_options ;
lib icuin : : <toolset>intel <target-os>windows <variant>debug <name>icuind <runtime-link>shared <conditional>@path_options ;
lib icuin : : <toolset>intel <target-os>windows <name>icuin <runtime-link>shared <conditional>@path_options ;
lib icuin : : <name>sicui18n <runtime-link>static <conditional>@path_options ;
lib icuin : : <toolset>msvc <variant>debug <name>sicuind <runtime-link>static <conditional>@path_options ;
lib icuin : : <toolset>msvc <name>sicuin <runtime-link>static <conditional>@path_options ;
lib icuin : : <toolset>intel <target-os>windows <variant>debug <name>sicuind <runtime-link>static <conditional>@path_options ;
lib icuin : : <toolset>intel <target-os>windows <name>sicuin <runtime-link>static <conditional>@path_options ;
lib icuin : : <name>this_is_an_invalid_library_name ;
searched-lib icuin : : <name>icui18n <runtime-link>shared <conditional>@path_options ;
searched-lib icuin : : <toolset>msvc <variant>debug <name>icuind <runtime-link>shared <conditional>@path_options ;
searched-lib icuin : : <toolset>msvc <name>icuin <runtime-link>shared <conditional>@path_options ;
searched-lib icuin : : <toolset>intel <target-os>windows <variant>debug <name>icuind <runtime-link>shared <conditional>@path_options ;
searched-lib icuin : : <toolset>intel <target-os>windows <name>icuin <runtime-link>shared <conditional>@path_options ;
searched-lib icuin : : <name>sicui18n <runtime-link>static <conditional>@path_options ;
searched-lib icuin : : <toolset>msvc <variant>debug <name>sicuind <runtime-link>static <conditional>@path_options ;
searched-lib icuin : : <toolset>msvc <name>sicuin <runtime-link>static <conditional>@path_options ;
searched-lib icuin : : <toolset>intel <target-os>windows <variant>debug <name>sicuind <runtime-link>static <conditional>@path_options ;
searched-lib icuin : : <toolset>intel <target-os>windows <name>sicuin <runtime-link>static <conditional>@path_options ;
searched-lib icuin : : <name>this_is_an_invalid_library_name ;
}

ICU_OPTS =
Expand Down Expand Up @@ -421,7 +421,7 @@ local cxx_requirements = [ requires
cxx11_variadic_templates
] ;

boost-lib locale
lib boost_locale
:
encoding/codepage.cpp
shared/date_time.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# https://www.boost.org/LICENSE_1_0.txt

import config : requires ;
import ../../predef/tools/check/predef : check : predef-check ;
import predef : check : predef-check ;

project : requirements
<library>/boost/locale//boost_locale
Expand Down

0 comments on commit 9277c65

Please sign in to comment.