mirror of https://github.com/gabime/spdlog.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
![]() This should only affect the library part, and to be more specific, the shared library part. Cmake allows to generate a special header file through GenerateExportHeader()[1]. This defines - amongst other - a SPDLOG_EXPORT Symbol, that does the right thing, depending on compiler / OS. On Windows, default is, if I recall correctly, that all symbols are not exported while Linux does it the other way around. So this patch sets default to *not* export symbols except those marked SPDLOG_EXPORT. Behaviour with Windows and Linux should be the same. Also, I removed SPDLOG_BUILD_SHARED in favour of the standard BUILD_SHARED_LIBS, which is a global symbol. This *might* give some issues when used as add_subdirectory(), but I am not sure. Also I made Threads::Threads private, so a depending cmake package does not need to have find_package(Threads) on. Why all that? On x86_64, gcc 8.3.0 .so code size reduction is: 811320 bytes original vs. 532536 now (~65% of the original). And, I *guess*, this will resolve the issue that it is not possible to use shared libs with windows. But I cannot test it, I only have Linux. [1] https://cmake.org/cmake/help/latest/module/GenerateExportHeader.html Signed-off-by: Matthias Schoepfer <matthias.schoepfer@ithinx.io> |
6 years ago | |
---|---|---|
.. | ||
CMakeLists.txt | 6 years ago | |
catch.hpp | 6 years ago | |
catch.license | 6 years ago | |
includes.h | 6 years ago | |
main.cpp | 10 years ago | |
meson.build | 6 years ago | |
test_async.cpp | 6 years ago | |
test_backtrace.cpp | 6 years ago | |
test_create_dir.cpp | 6 years ago | |
test_daily_logger.cpp | 6 years ago | |
test_dup_filter.cpp | 6 years ago | |
test_errors.cpp | 6 years ago | |
test_file_helper.cpp | 6 years ago | |
test_file_logging.cpp | 6 years ago | |
test_fmt_helper.cpp | 6 years ago | |
test_macros.cpp | 6 years ago | |
test_misc.cpp | 6 years ago | |
test_mpmc_q.cpp | 6 years ago | |
test_pattern_formatter.cpp | 6 years ago | |
test_registry.cpp | 6 years ago | |
test_sink.h | 6 years ago | |
test_stdout_api.cpp | 6 years ago | |
test_systemd.cpp | 6 years ago | |
utils.cpp | 6 years ago | |
utils.h | 6 years ago |