2
0
mirror of https://github.com/boostorg/locale.git synced 2026-02-01 20:42:18 +00:00

55 Commits

Author SHA1 Message Date
Alexander Grund
231b5f96e3 Disable Werror for dependencies 2025-10-21 09:59:09 +02:00
Alexander Grund
96b98364f6 Move Boost dependencies to library instead of project requirements
Otherwise all test builds and imported libs will link to those too.
This causes e.g. Boost.Thread to be build and installed as a shared
library due to e.g. `<library>icuuc/<link>shared`
2025-10-21 09:59:09 +02:00
Alexander Grund
42e65d0d3d Implement support for uint64_t values in ICU backend
ICU doesn't support uint64_t directly but provides access to formatting
and parsing of decimal number strings.
Use Boost.Charconv to interface with that.

Fixes #235
2025-01-15 13:57:44 +01:00
Alexander Grund
258e959402 Use Boost::charconv for try_to_int 2025-01-10 13:33:05 +01:00
Alexander Grund
5a58e65bda Remove superflous subfolders of src
The shorter paths make the sources easier to navigate.

Basically revert of #99 / f44b3bb771
after the underlying issue is resolved.
2025-01-10 12:50:45 +01:00
Alexander Grund
843fdc9157 Replace (semi-)absolute includes to implementation headers by relative ones
Makes it easier to see the distinction, especially for tools.
2025-01-04 20:55:49 +01:00
Alexander Grund
ec1676280e Raise minimum ICU version to 4.8.1
A lot of checks and a major workaround are for ICU 4.8 or earlier which
can be removed.
An annoying bug (Parsing of timezones like "GMT" in "full" format followed by unrelated text)
fixed in 4.8.1 is worth avoiding by requiring this version over 4.8.0.
2024-12-27 12:14:43 +01:00
Alexander Grund
791d7a1492 Build: Make SOURCES variables local 2024-12-27 12:14:26 +01:00
Alexander Grund
ea76606d36 Reduce number of C++11 compiler checks
Speed up the configuration step:
- defaulted moves implies defaulted functions and rvalues
  -> Clang 3.0, MSVC 19.0/2015
  -> decltype, noexcept, auto & variadic templates also available in all compilers that support those
- override requires GCC 4.7+
- hdr type_traits implies hdr functional for all known stdlibs
2024-12-27 12:13:10 +01:00
Alexander Grund
6b79d8bbeb Refactor ICU search for more clarity 2024-12-14 16:18:53 +01:00
Alexander Grund
3ff8e5a3f0 Fix dynamic build imports 2024-08-26 17:21:02 +02:00
Rene Rivera
03657559f8 The locale features need to be at the root as they need to be defined for all subprojects on load. 2024-08-26 17:21:02 +02:00
Rene Rivera
f66f62cb2b Split b2 dependencies into public and private. 2024-08-26 17:21:02 +02:00
Rene Rivera
4bf61b7a29 Fix dynamic build to signal to export symbols. 2024-08-26 17:21:01 +02:00
Rene Rivera
8fe7802f0e Move inter-lib dependencies to a project variable and into the build targets. 2024-08-26 17:21:01 +02:00
Rene Rivera
36dff671ba Add missing import-search for cconfig/predef checks. 2024-08-26 17:21:01 +02:00
Rene Rivera
cf272ebf15 Add missing NO_LIB usage requirements. 2024-08-26 17:21:01 +02:00
Rene Rivera
9277c65aa7 Make the library modular usable. 2024-08-26 17:21:00 +02:00
Alexander Grund
ab395c1dc1 Fix Iconv check in B2 in combination with ICU
Including ICU might bring another Iconv in (e.g. on FreeBSD)
which has different symbols.
So check for Iconv after adding the ICU options
2024-01-24 19:07:39 +01:00
Alexander Grund
8445dce654 Allow to disable the IConv backend in B2
Useful if the IConv implementation has bugs.
Now honors `boost.locale.iconv=off` correctly similar to other backends
2023-11-21 17:38:06 +01:00
Alexander Grund
a4b80f9de2 Deprecate create_*_new_ptr functions and introduce helper to create a unique_ptr
Ownership should always be clear so remove those functions returning raw pointers.
2023-06-28 22:48:53 +02:00
Alexander Grund
958ca63e4f Factor out iconv_codecvt and remove use of std::shared_ptr
Iconv is also available on Windows so not specific to the POSIX backend.
Instead of a shared_ptr to a vector we can simply use a `std::array`.
Finally the `iconv_t` can be put into an RAII class.
2023-03-06 16:37:38 +01:00
Alexander Grund
a7f94c0eb7 Put encoding utils into util/encoding.{hc}pp
This deduplicates e.g. `convert_encoding_name`/`normalize_encoding`
and makes the structure more logical by not mixing those util functions
with the char converter code.
2023-02-18 18:56:56 +01:00
Alexander Grund
7b0c37d404 Move BOOST_LOCALE_SOURCE define to buildsystem
Ensures that this is defined consistently for all files.
Fixes #145
2023-02-17 17:17:29 +01:00
Alexander Grund
1cc2a017ab Fix some MSVC warnings
Define `_SCL_SECURE_NO_WARNINGS` for building the library to avoid "Call to 'std::copy' with parameters that may be unsafe" in `src\boost\locale\std\converter.cpp`
This also allows to remove the multiple suppressions of C4996
2022-11-22 09:15:17 +01:00
Joseph Malle
6f36132f1d spelling and grammar fixes 2022-10-27 20:33:32 +02:00
Alexander Grund
d860e99818 Factor out implementation of formatters_cache to source file 2022-10-26 19:55:39 +02:00
Alexander Grund
18e5be4e86 Make icu-path non-local 2022-10-19 14:24:06 +02:00
Alexander Grund
baaa24f101 Update ICU configuration from Boost.Regex 2022-10-18 22:30:04 +02:00
SSE4
fc7fa8b609 change ICU_LINK configuration
Signed-off-by: SSE4 <tomskside@gmail.com>
Rebased and combined with "use lib instead of searched-lib everywhere"
by Flamefire <git@grundis.de>
2022-10-18 22:13:25 +02:00
Flamefire
8487701b82 Fix ios_prop on libc++
When copying properties from one stream to another the old stream only
gets a `erase_event` but may or may not have the value reset/zeroed.
So do that in all cases even though it is redundant on stream destruction.
2022-10-12 11:43:21 +02:00
Alexander Grund
b6240532ec Refactor tests using locale names
Unify the tests a bit so it is easier to find the used locales
2022-09-16 23:28:26 +02:00
Flamefire
564a4224ff Drop now unncessary warning supressions 2022-09-14 11:22:45 +02:00
Alexander Grund
3bc127eb35 Require C++11
Modify build configs and CI files to check for C++11 support
2022-09-14 09:36:08 +02:00
Alexander Grund
6f66770bb3 Fix configure check for external iconv and ICU (64 bit)
Partial revert of 72a8e9eb75
The `exe` rule implicitly creates an `obj` rule for the given cpp file if it doesn't exist yet. This causes trouble when the cpp file is meant to be built with different options by multiple `exe` rules as the 2nd rule will reuse the `obj` rule from the first and hence ignores the different options such as the include path.
Here it affects the `has_external_iconv` target due to the conflict with the `has_iconv` target.
Hence add back an `obj` rule for the former. Fixes #63
The same problem exists with the `has_icu*` targets. Fix it similarly.
2022-09-13 10:49:09 +02:00
Alexander Grund
10b4dcc4af Honor ICU_PATH in project-config.jam
When `ICU_PATH` isn't set via `-s` or in the environment use the value from project-config.
2022-07-13 11:40:57 +02:00
Alexander Grund
3da7cdce91 Simplify ICU_LINK_LOCALE handling
Combine with the ICU_LINK path by conditional assignment
2022-07-12 18:42:09 +02:00
Alexander Grund
707f801c55 Remive vim markers
To be replaced by clang-format in the future.
2022-07-12 18:35:42 +02:00
Alexander Grund
595934f25e Update license headers
Use the more concise format omitting the reference to the license file
and refer to the URL only.
2022-07-12 18:35:41 +02:00
Alexander Grund
fc42deafb3 Add ICU_LINK_LOCALE to specify link flags for using ICU
Only temporary for the Boost 1.80 release to allow building Boost.Locale
and Boost.Regex until a full solution is introduced in Boost 1.81.
2022-07-07 10:36:33 +02:00
Alexander Grund
72a8e9eb75 Refactor build Jamfile
- Sort imports
- Remove unnecessary `obj` targets and use `exe` directly
- Use `} else` style
- Add missing parentheses to complex conditions - Closes #101
2022-07-07 09:58:57 +02:00
Alexander Grund
41868c62a0 Support systems without implicit include path
To support e.g. recent Cygwins where relative paths to the current file are not automatically resolved
move the sources into a `boost/locale` subfolder and add `src` to the private include paths.
This then allows to include those files as `"boost/locale/foo/bar.hpp"`.
2022-07-02 15:38:31 +02:00
Alexander Grund
cece0fb018 Enable warnings-as-error in test
Ensures a warning-free build
2022-05-30 17:20:22 +02:00
Alexander Grund
7ff789522d Suppress remaining CRT "secure" warnings
Add _CRT_SECURE_NO_WARNINGS to test files and build rules
2022-05-30 10:32:01 +02:00
Alexander Grund
5e81d50f63 Fix shared-link define
BOOST_LOCALE_DYN_LINK must be defined when the shared library is build
or consumed.
boost-lib does this (and the install) automatically, so use it.
Cleanup the remainder of the Jamfiles.
2022-05-27 11:49:56 +02:00
Andrey Semashev
b01aab1d28 Trim trailing spaces. 2019-01-14 21:10:38 +03:00
Andrey Semashev
aebac1401f Remove linking with Boost.System.
Since Boost.System is header-only now, no need to link with the library.
2019-01-14 21:08:25 +03:00
Artyom Beilis
864be816dc Added detection of xlocale support 2015-10-11 02:09:48 +03:00
Artyom Beilis
ef9d900a5a Lineup with Boost.Trunk
Fixes:

- Fixed compilation with requirement of boost_system
- Fixed some problems with STLPort builds


[SVN r78560]
2012-05-23 17:39:25 +00:00
Artyom Beilis
121edcff48 Added test for gcc to check if it can accept -shared options
[SVN r73506]
2011-08-03 09:42:52 +00:00