2
0
mirror of https://github.com/boostorg/log.git synced 2026-01-19 04:22:09 +00:00

89 Commits

Author SHA1 Message Date
Andrey Semashev
3ea24c81f2 Enable building IPC components on Cygwin.
Reportedly, Boost.Interprocess has been fixed on Cygwin, so we can enable
building IPC components by default on this target.

Refs https://github.com/boostorg/interprocess/issues/242.
2025-12-14 03:09:14 +03:00
Christopher Kohlhoff
ef6aec2abb Use new minimal boost_asio_core dependency.
Re-enable Boost.Asio in 32-bit MinGW-w64 job in AppVeyor.
2025-07-08 22:30:42 +10:00
Andrey Semashev
805f0cf971 Change searched-lib to lib in the Jamfile.
Apparently, searched-lib was not supposed to be used in libraries,
and the simple lib target is the preferred way to declare external
libraries.

https://github.com/bfgroup/b2/issues/431#issuecomment-2985057673
2025-06-19 02:42:42 +03:00
Andrey Semashev
f01996cfd3 Removed dependency on Boost.Random.
Boost.Random imposes excessive compiler requirements that prevents
Boost.Log from being built and tested with 32-bit gcc 8 on MinGW-w64.
We only need a fast RNG to quickly shuffle sinks in case of thread
contention in the core.

Use a local implementation of xorshift64 for such an RNG, which should
be even faster than taus88 and have sufficiently good quality. Also,
use std::random_device to initialize the PRNG. Keep the clock/thread_id
based initialization as a backup, in case if std::random_device fails.

Refs https://github.com/boostorg/random/issues/131.
2025-06-14 20:19:55 +03:00
Andrey Semashev
ecc4466bc0 Added BOOST_LOG_WITHOUT_ASIO config option.
This lets users to disable Boost.ASIO-related functionality and remove
the dependency on Boost.ASIO. This may be useful on platforms where
Boost.ASIO or its dependencies don't work or disabled.

Refs https://github.com/chriskohlhoff/asio/issues/1637.
2025-06-13 17:17:31 +03:00
Andrey Semashev
4bd90c7d6c Allow multiple defines to be specified in has-config-flag. 2025-05-30 15:44:23 +03:00
Andrey Semashev
15bfb08b0a Relax property check in has-config-flag.
We are only interested in whether a config flag is defined, the value
of the define is irrelevant. So instead of checking for a value of 1,
detect the flag with any value, if present.
2025-05-30 15:10:23 +03:00
René Ferdinand Rivera Morell
2530a4e03a Add support for modular build structure. (#233)
* Make the library modular usable.

* Switch to library requirements instead of source. As source puts extra source in install targets.

* Clean up build dependencies.

* Remove external build references and avoid custom project loading.

* Use relative paths to declare config sub-projects.

* Add missing NO_LIB usage requirements.

* Add missing library ref.

* Add missing import-search for cconfig/predef checks.

* Add requires-b2 check to top-level build file.

* Update dependencies.

* Bump B2 require to 5.2

* Update copyright dates.

* Move inter-lib dependencies to a project variable and into the build targets.

* Remove custom symbolic project names for config subprojects. And use project root relative targets.

* Move private deps to the build project.

* Put back default boost locale link as locale build is now fixed.

* Set default address-model and architecture to avoid extra/custom detection logic. Put back missing check and config rules.

* Adjust doc build to avoid boost-root references.

* Fix ref to predef.jam location.

* Have B2 build use same deps as CML for per-target private/public.

* Add log dep to log_setup, as it's needed on some platforms.

* Add boost_log_with_support target to mirror CML.

* Fix platform specific winapi dependency spec.
2025-05-26 00:48:16 +03:00
Andrey Semashev
6366d73335 Updated references to Boost.Interprocess issue with Cygwin. 2024-12-17 04:29:24 +03:00
Andrey Semashev
26c93dc061 Replaced Boost.Thread synchronization primitives with std equivalents.
This replaces boost::thread and most mutexes and condition variables with
std equivalents. It also adds support for std lock types to the strictest_lock
type trait.

This significantly, although not completely, reduces the dependency on
Boost.Thread.

Refs https://github.com/boostorg/log/issues/232.
2024-08-16 20:01:18 +03:00
Andrey Semashev
3ff5b0d8ba Removed dependency on Boost.Bind. 2023-10-02 00:26:36 +03:00
Andrey Semashev
c7c0aa7acb Added Boost.Build requirements on C++11 features we use. 2023-10-01 23:11:51 +03:00
Andrey Semashev
4db6450fe8 Conditionally link with Boost.Regex library, if it's in C++03 mode.
Boost.Log supports compilers that do not qualify as C++11 compilers
for Boost.Regex, even if they are compiling in C++11 mode. In that
case, we still need to link with Boost.Regex v4 prebuilt library.

For more recent compilers, Boost.Regex v5 is used, and that is
a header-only library. This commit removes linking with Boost.Regex
when this is detected at configure time.

Note that only Boost.Build is updated. CMake doesn't need to be
updated since even header-only libraries need to be listed as
dependencies.

Closes https://github.com/boostorg/log/pull/219.
2023-09-25 20:14:34 +03:00
Andrey Semashev
b3ffed4ec2 Disable building boost_log_setup when settings parsers are disabled.
Check the BOOST_LOG_WITHOUT_SETTINGS_PARSERS macro in the Jamfile and
suppress building boost_log_setup if it is defined. The built library
is empty in this case, and MSVC linker even produces no library,
which later breaks installation.

Fixes https://github.com/boostorg/log/issues/164.
Closes https://github.com/boostorg/log/pull/165.
Blocked by https://github.com/bfgroup/b2/issues/104.
2023-06-13 19:53:07 +03:00
Andrey Semashev
a3717b0ccf Merge pull request #155 from wzssyqa/wzssyqa-patch-1
Rename mips1 to mips
2021-12-10 01:47:02 +03:00
Andrey Semashev
6d4021209d Moved is_debugger_present predicate implementation to a compiled source file.
This allows to avoid including windows.h in public headers and defining an
arbitraty target Windows version to make IsDebuggerPresent API available.
2021-09-18 00:09:46 +03:00
Andrey Semashev
33f4b3310c Only define BOOST_USE_WINDOWS_H when building Boost.Log.
This is to work around target Windows version mismatch between Boost.Log
and test/examples code caused by other libraries (e.g. Boost.SmartPtr)
including windows.h without using Boost.WinAPI or defining the target
Windows version. Windows SDK defines its own default target version,
which doesn't necessarilly match the default in Boost.WinAPI, which
is used when building Boost.Log.

By not using windows.h when building tests and examples we make the
other libraries to provide their own definitions of WinAPI components
instead of including windows.h, and therefore avoid them defining a
different target Windows version.
2021-09-17 23:52:37 +03:00
YunQiang Su
3cbc2585c3 rename mips1 to mips
In fact mips1 is now used for all mips revisions.
2021-07-22 15:58:08 +08:00
Andrey Semashev
de4e85e9b3 Switched to c++-template-depth feature instead of explicit compiler flags.
This allows to specify the limit for other compilers that support it
and remove it for clang-cl, which doesn't.
2020-09-08 18:23:57 +03:00
Andrey Semashev
4ef885fc7a Moved MSVC C/C++ runtime deprecated macros to a common place.
The _SCL_SECURE_NO_WARNINGS, _SCL_SECURE_NO_DEPRECATE,
_CRT_SECURE_NO_WARNINGS and _CRT_SECURE_NO_DEPRECATE macros need to be
defined for every compiler that uses MSVC C/C++ runtime, so instead of
duplicating these definitions in multiple places, define them for
Windows platform regardless of the compiler. In particular, they are
now defined for clang-cl.
2020-09-08 18:20:13 +03:00
Andrey Semashev
b4399c0407 Moved SSSE3/AVX2 compiler flag deduction to a common submodule.
Also, use gcc-style command line arguments by default as most compilers
tend to support them.

Marked config obj targets explicit.
2020-09-08 02:50:08 +03:00
Andrey Semashev
f1108cdb0c Fixed Jamfile and made config messages more human-friendly. 2020-09-07 11:00:50 +03:00
Andrey Semashev
48d2319d7b Added gcc-like SSSE3/AVX2 flags for qcc.
Presumably, qcc is based on gcc, so it should accept the same flags.
2020-09-07 01:11:37 +03:00
Andrey Semashev
027c334063 Marked system library targets explicit. 2020-06-08 01:06:59 +03:00
Andrey Semashev
a79103cb3d Removed linking with Boost.DateTime.
Boost.DateTime is now header-only.
2020-05-05 14:41:56 +03:00
Andrey Semashev
1138b47fce Removed linking with Boost.System.
Since Boost.System is now header-only, no need to link with the library.
2019-01-14 20:16:20 +03:00
Andrey Semashev
effd8568a4 Disable Boost.Interprocess on Cygwin.
Boost.Interprocess doesn't compile on Cygwin:

https://github.com/boostorg/interprocess/issues/76

Also, disable affected tests and examples.
2019-01-06 19:51:48 +03:00
Andrey Semashev
61639024c9 Added _XOPEN_SOURCE=600 define for Cygwin, which is needed for pthread rwlocks. 2019-01-06 02:10:12 +03:00
Andrey Semashev
67eef1afba Switch to uncaught_exceptions from Boost.Core.
The implementation in Boost.Core was based in unhandled_exception_count
in Boost.Log, therefore we remove our loca implementation in favor
of the common one.
2018-12-17 19:21:25 +03:00
Andrey Semashev
d9014d2fbc Hidden visibility is now used by default in the superproject. 2018-09-30 22:24:06 +03:00
Andrey Semashev
d3f3776024 Removed compiler visibility check in favor of the visibility feature in BBv2.
Boost.Build offers better compatibility with different compilers, some of
which use different flags for changing the default visibility. This also
slightly simplifies Boost.Log Jamfile.
2018-08-25 02:02:07 +03:00
Andrey Semashev
d3226ec845 Updated Jamfile to avoid special characters in condition.
This silences a bjam warning.
2018-03-09 01:15:10 +03:00
Peter Dimov
ae6d04e58d Add boost-install to build/Jamfile 2017-12-17 19:06:56 +02:00
Andrey Semashev
d6d29f5f6c Exclude FreeBSD and other BSD systems from defining _XOPEN_SOURCE since Boost.ASIO fails to compile otherwise. 2017-07-01 22:03:52 +03:00
Andrey Semashev
a73ed3ef38 Updated library build scripts to unify system macros configuration for different platforms. In particular, this should improve compatibility with Solaris. It also avoids duplicating system macros in different places. 2017-06-30 23:42:45 +03:00
Andrey Semashev
299603ff02 Fixed auto-detection of native syslog API.
The auto-detection was removed in 1.62, which resulted in UDP socket-based implementation being always used. The new auto-detection verifies the presence of syslog.h and all required components it provides.

Fixes ticket #12600.
2016-11-10 19:46:52 +03:00
Andrey Semashev
caa81d4c25 Added a check for natively supported 32-bit atomic ops. If not supported, exclude IPC facilities from build. 2016-09-15 15:37:19 +03:00
Andrey Semashev
7138345801 Added a workaround for building failure with MinGW. 2016-07-13 00:20:42 +03:00
Andrey Semashev
9727acd277 Added a missing return in check-message-compiler. 2016-07-12 22:57:50 +03:00
Andrey Semashev
51af4eeae9 Fixes for Windows. 2016-04-14 19:32:04 +03:00
Andrey Semashev
05826649a0 Extracted platform-specific logic regarding interprocess object names to a separate object_name wrapper. Use this wrapper wherever interprocess queue name was used. Added a test for the wrapper. Extracted auto_handle to a separate header. 2016-04-14 19:32:04 +03:00
Andrey Semashev
09ea7f70d7 Working on the Windows implementation of reliable interprocess queue. Removed unused keywords. Ported to Boost.Align implementation of size alignment function. 2016-04-14 19:32:03 +03:00
Andrey Semashev
e5d5c66683 Changed the AVX2 flag for Intel compilers to -xCORE-AVX2. This flag is said to be supported since Intel Compiler 13 and is supposed to be better than -march=core-avx2 since it does not set the target architecture, which may be set by the user. 2016-04-14 19:32:03 +03:00
Andrey Semashev
24c70e7f29 Cleaned up the Jamfile and added a config macro for disabling IPC queues. Removed -march compiler flags where possible as they may override the user's choice. Removed the log-api feature as it no longer makes sense (the library is configured by enabling/disabling the particular sinks). Some renaming and cleanup. 2016-04-14 19:32:03 +03:00
Andrey Semashev
84b45f78a6 Continuing renaming files. 2016-04-14 19:32:03 +03:00
Andrey Semashev
489ac05ddd Extracting interprocess message queue to separate headers/sources. 2016-04-14 19:32:03 +03:00
Andrey Semashev
9f1978619b Extracted permissions wrapper to a separate header. Avoid using shared_ptr on Windows and add interop with Boost.Interprocess. 2016-04-14 19:32:03 +03:00
Andrey Semashev
696a0a72af Changed the fix for Solaris to define _XOPEN_SOURCE=500. This should fix #12098. 2016-04-01 10:56:15 +03:00
Andrey Semashev
886f0d0eb9 Attempt to work around #12098. Solaris headers cannot be included in C++ when _XOPEN_SOURCE=600 is defined. 2016-03-26 14:18:14 +03:00
Georg Sauthoff
b2bc15cf81 Request POSIX 2004 definitions on Solaris 10
Otherwise, the Boost Log build fails.

Tested on Solaris 10/SPARC (with gcc 4.9).
2016-02-08 20:58:36 +01:00