Commit Graph

217 Commits

Author SHA1 Message Date
gabime
1add9c9a02 Added SPDLOG_WCHAR_FILENAMES options to CMake 2019-09-28 11:19:56 +03:00
Gabi Melman
4da95066a0
Merge pull request #1241 from orbea/fmt
cmake: Only install fmt headers when SPDLOG_FMT_EXTERNAL is not defined.
2019-09-23 10:25:48 +03:00
orbea
920dd078f3 cmake: Only install fmt headers when SPDLOG_FMT_EXTERNAL is not defined. 2019-09-22 23:19:11 -07:00
orbea
588910129c cmake: Add a new spdlog.pc pkgconfig file.
Fixes https://github.com/gabime/spdlog/issues/1237.
2019-09-22 19:04:29 -07:00
gabime
c1c23d1e7b Revert pull #1228 2019-09-18 16:16:44 +03:00
gabime
e52672c263 Fixed CMakeLists.txt 2019-09-18 15:08:15 +03:00
Christian
c87882e82f added version check 2019-09-18 09:20:01 -02:30
Christian
bd4301b2c1 added arch_independent option 2019-09-17 14:45:59 -02:30
gabime
45a18a61c6 CmakeLists.txt: Added version-number and debug suffixes + SPDLOG_BUILD_SHARED property 2019-09-08 00:42:23 +03:00
gabime
dae4f9fef6 split spdlog.cpp to multiple .cpp files 2019-09-05 14:37:25 +03:00
gabime
7dc378e296 Update CMakeLists.txt 2019-08-19 11:38:19 +03:00
gabime
0335e3fcc0 Print error and abort instead of throw if SPDLOG_NO_EXEPTIONS is defined 2019-08-19 11:31:33 +03:00
gabime
b0a25f0183 wip - no-exceptions support 2019-08-18 19:46:28 +03:00
gabime
a8b5e3da29 Removed unneeded test targets from CMakeLists 2019-08-16 18:48:18 +03:00
gabime
8cc0997f79 Added SPDLOG_WCHAR_SUPPORT options to CMake under windows 2019-08-09 10:31:53 +03:00
gabime
8dc3a66688 Fix #1180 2019-08-06 19:12:35 +03:00
gabime
121fc0a273 Minor update to CMakelists 2019-07-14 13:27:09 +03:00
gabime
4d9281018f Minor update to CMakelists 2019-07-14 13:26:01 +03:00
gabime
330d491eba Enable again test building by default in cmake 2019-07-10 01:45:05 +03:00
gabime
07d753176f Update CMakeLists.txt to not build tests by default 2019-07-07 13:36:46 +03:00
gabime
bb0f3839c1 Updated CMake options and defaults 2019-07-01 02:06:09 +03:00
gabime
8970fd5d2f CMake cosmetic 2019-06-19 18:01:34 +03:00
gabime
67d5f65507 CMake support for building shared lib (not for win32) 2019-06-19 17:52:50 +03:00
gabime
7d678be07a CMake - turn off examples by default 2019-06-19 17:31:25 +03:00
gabime
cf64f2baca Fixed CMake address sanitizer 2019-06-10 18:32:10 +03:00
gabime
68a0193d95 CMake refactoring to functions 2019-06-10 18:09:36 +03:00
Jan Kundrát
c60f790793 Do not impose -Wextra -Wconversion etc on library users
I had to nuke the flags targetting spdlog_header_only because in CMake,
an interface target apparently really only supports the INTERFACE
option.

As I am only targeting Linux, the MSVC changes rely on spdlog's CI and
manual code review. That said, it makes sense to also stop forcing these
options on third party code, assuming that the CMake installations work
the same on Windows.

Fixes #1104
2019-06-10 10:54:49 +02:00
gabime
5743adc467 CMake use extract version from version.h 2019-05-29 15:15:35 +03:00
gabime
76fc166e11 CMakeLists.txt minor improvments 2019-05-29 01:41:48 +03:00
gabime
d439f75491 Minor CMake cosmetic fix 2019-05-29 00:17:38 +03:00
gabime
c559067f77 CMake refactoring 2019-05-29 00:13:02 +03:00
gabime
30bd80bd85 CMake improvements 2019-05-29 00:05:24 +03:00
gabime
54f1941691 Fixed target_compile_options in cmake 2019-05-24 01:39:02 +03:00
gabime
6636ae6e63 CmakeLists.txt compiler warnings 2019-05-23 23:35:30 +03:00
gabime
2e75f42c69 Install using GNUInstallDirs in cmake 2019-05-23 19:17:52 +03:00
gabime
65576707bf Removed shared_lib option (not supported by windwos) and remove example and test from default build 2019-05-23 18:26:47 +03:00
gabime
6ec8a06a09 Fixed Cmake under windows and disable bench build from default config 2019-05-22 12:32:59 +03:00
gabime
1ef80d6330 Updated CMakeLists.txt 2019-05-19 19:39:38 +03:00
Gabi Melman
a532a072ce
Update CMakeLists.txt 2019-05-19 17:06:22 +03:00
gabime
87eb569929 More updates to CMake (version support , cmake.in) 2019-05-19 15:47:49 +03:00
David Zemon
dd2f293f33 Clean up CMake a bit more 2019-05-17 23:33:44 -05:00
David Zemon
24e4f0aa87 Allowed overriding of SPDLOG_MASTER_PROJECT to better support Conan 2019-05-17 23:31:30 -05:00
David Zemon
6fe899af10 Set Threads::Threads dependency on spdlog libs - don't make user do it 2019-05-17 23:28:53 -05:00
David Zemon
b021be29e5 Add support for .tar.gz and .zip packages via CPack 2019-05-17 23:27:44 -05:00
David Zemon
55e7844ca0 Remove the namespaced
Namespaces are good for avoiding collisions, but since the
non-namespaced targets still exist, it does no good to add the
namespaced targets on top.
2019-05-17 23:27:44 -05:00
David Zemon
8dd85285e7 Allow user to choose between static or shared library 2019-05-17 23:26:06 -05:00
gabime
b3fe4b54c8 Fixed CMakeLists.txt 2019-05-13 01:28:06 +03:00
gabime
872ea6bf09 Deleted redundant Make files and solutions 2019-05-13 01:13:58 +03:00
gabime
32fb9d51b9 Cmake update to support both header-only and static 2019-05-13 01:06:25 +03:00
gabime
ee0fdf016a Minore cmake fix 2019-05-12 16:13:13 +03:00
gabime
8b244ca988 Moved format.cpp into spdlog.cpp - this way only one src file is needed 2019-05-12 00:43:58 +03:00
gabime
6bcb422c80 clang format and SPLDOG_HEADER_ONLY macro 2019-05-12 00:22:39 +03:00
gabime
005450ff13 wip 2019-05-11 13:52:46 +03:00
gabime
c031ae2aab Cmake message 2019-05-08 17:37:25 +03:00
gabime
29c949ab03 static lib by default 2019-05-08 16:36:14 +03:00
gabime
576e389788 static lib by default and tests 2019-05-08 16:34:20 +03:00
gabime
7b15a3d345 wip cmake 2019-04-27 19:42:19 +03:00
gabime
eedb43d756 wip cmake 2019-04-27 19:41:25 +03:00
gabime
338125b93a wip cmake 2019-04-27 19:40:24 +03:00
gabime
3ecc3ab798 wip cmake 2019-04-27 19:38:39 +03:00
gabime
de1cdb2dbe wip cmake 2019-04-27 19:38:26 +03:00
gabime
c9887874bc wip cmake 2019-04-27 19:37:59 +03:00
gabime
69fcaf14e5 wip static-lib 2019-04-27 18:44:48 +03:00
gabime
f414198fee Cmake fix 2019-04-27 02:42:33 +03:00
gabime
c1c2ff2d07 wip 2019-04-27 02:33:33 +03:00
gabime
ff89f1476d Restored error_handler as std::function 2019-04-26 18:14:59 +03:00
gabime
baefe0b3f6 wip 2019-04-26 15:11:01 +03:00
gabime
7e29c48379 removed spdlite 2019-04-06 12:57:09 +03:00
gabime
f36be4d5e4 Moved lite source to folders| 2019-03-30 16:49:02 +03:00
gabime
57a312cb1a lite wip 2019-03-29 14:46:31 +03:00
Martin Green
9fca0b20f0 Add CMake option for conditional installation 2019-02-06 07:38:26 +02:00
Francois Chabot
734af31c13
Allow the inclusion of an external fmtlib as as sub_directory 2019-02-01 12:12:58 -05:00
Sergey Kovalevich
90a299f424 CMAKE_BINARY_DIR -> CMAKE_CURRENT_BINARY_DIR 2019-01-28 11:48:45 +03:00
Pius Raeder
a29e518cfe Disable building benchmarks by default
Building the benchmarks requires google-benchmark to be installed which is
not the case for most of the build systems. The option now has a tiny
hint what the requirement is and where to get it.

closes #975
2019-01-23 10:03:03 +01:00
gabime
a7148b718e Version 1.3.1 2019-01-18 12:13:07 +02:00
Carsten Neumann
084bc72d90 Fix handling of external fmt lib
Using an external fmt lib should cause the spdlog::spdlog target to have
a dependency on fmt lib - so that a consuming project does not need
to call find_package(fmt) and target_link_libraries(... fmt::fmt).

To this end a new cmake option SPDLOG_FMT_EXTERNAL is introduced which
makes spdlog depend on fmt lib and defines the SPDLOG_FMT_EXTERNAL macro
to avoid using the bundled fmt lib. The value of SPDLOG_FMT_EXTERNAL is
also stored in the installed spdlogConfig.cmake and if it is ON
find_dependency() is used to ensure the fmt::fmt target is imported.
2018-12-17 10:18:16 -06:00
gabime
7275fb6f52 simplify SPDLOG_BUILD_TESTS Cmake option 2018-12-02 12:25:46 +02:00
David P. Sicilia
85b4d7c8d6 CMake: include(CTest) only when building tests.
This is needed in order to support usage of this library as a
subdirectory in a parent project.  In that situation, prior
to this change, the inclusion of CTest would unconditionally
enable BUILD_TESTING which would then bleed into other parts
of the project.

Also added some comments explaining how this logic works.
2018-12-01 20:37:06 -05:00
gabime
b368d18b0f Added default logger API 2018-10-12 03:04:55 +03:00
gabime
c83c9a3193 Version 1.2.0 2018-10-07 22:31:36 +03:00
Sergey Alexandrov
75925762e8
Change the default value for SPDLOG_BUILD_xxx
The value based on whether spdlog is used as a third-party dependency or
as a standalone project. If spdlog is included through add_subdirectory,
the tests/examples/benchmarsk are disabled by default, and if spdlog is
configured standalone, then they are enabled by default.
2018-09-12 16:11:45 -04:00
gabime
0758b39061 Stop compilation on first error 2018-08-18 02:19:52 +03:00
gabime
a58d7594cb Fixed issue #798 and added -Wconversion compiler flag to build 2018-08-17 00:32:13 +03:00
gabime
b6b9d835c5 Version 1.1.0 2018-08-15 19:34:10 +03:00
gabime
ebea09c8b4 Added pedantic flag to compiler in cmake 2018-08-15 19:09:37 +03:00
Daniel Chabrowski
fb37585bc1 Little cmake and tests refactor
Change from spdlog_ex to const spdlog_ex& got rid of the GCC8 warning.
2018-08-14 21:33:47 +02:00
gabime
8008d7fe53 Replace emplace_back with push_back in pattern_formatter 2018-08-13 09:09:49 +03:00
gabime
da30e2ef18 Improved CMakeLists and added bench 2018-08-13 01:22:35 +03:00
Daniel Chabrowski
49d663f6c8 Move tsan/asan flag management to cmake
Add sudo: required to fix asan builds
2018-08-12 17:11:56 +02:00
Daniel Chabrowski
7e32ccbd8f Modify travis-ci, fix issues
Added:
* Release/Debug job for gcc 7 and clang 3.5
* Debug asan gcc 7 job
* Debug tsan gcc 7 job
* Disabled extensions
* Added a spdlog::spdlog alias for tests

Removed:
* Valgrind workaround, the current version is 3.10.1
* install_libcxx
* Makefiles

Fixed:
* examples build
* multisink build

Workarounds:
* gcc7 with tsan and asan needs gold linker, otherwise build
  fails becase of unrecognized option '--push-state'
2018-08-11 02:24:45 +02:00
Gabi Melman
bbff8abf58
Update CMakeLists.txt 2018-07-08 19:25:15 +03:00
gabime
8ee7b772a9 Added -O3 flag to CMakeLists.txt 2018-03-16 14:15:35 +02:00
Daniel Chabrowski
646a140ed4 Specify CXX language explicitly in CMake
Marking project as CXX will disable detecting C compiler and other checks.
Removed 'INCLUDES DESTINATION' as it made the include path appear doubled.
2018-02-11 21:13:33 +01:00
Gabi Melman
f258af4364
Update CMakeLists.txt 2018-01-12 16:06:30 +02:00
gabime
813dcbcf63 version 0.16.2 2017-12-22 18:50:08 +02:00
Gabi Melman
c060a10c10
update to version 0.16.1 2017-12-20 10:08:49 +02:00
Ľubomír Carik
dda8af0092 Update version strings to 0.16.0
Signed-off-by: Ľubomír Carik <Lubomir.Carik@anritsu.com>
2017-12-20 03:43:47 +01:00
Adrian Antonana
e6b9fa577d cmake: set project version to 0.14.0 2017-08-25 09:12:15 +02:00
Adrian Antonana
fe2fa4087d cmake: add some small comments to point out whats being done 2017-08-24 16:57:07 +02:00
Adrian Antonana
ab25004242 cmake: add some commend blocks to clearly differentiate CMakeLists file sections 2017-08-24 16:55:55 +02:00
Adrian Antonana
5504630e46 cmake: improve CMakeLists.txt
* support CMake user registry package registration
* use GNUInstallDirs to set installation firectories
* use spdlog namespace in both build and install interfaces
2017-08-24 16:55:06 +02:00
Lectem
47cf62f878 SPDLOG_BUILD_TESTING now depends on BUILD_TESTING
I encountered an issue when using spdlog through add_subdirectory.
Since SPDLOG_BUILD_TESTING is ON by default, it now adds tests to my project, even if BUILD_TESTING (the official CTest variable) is set to OFF.
cmake_dependent_option makes it so that if someone enables BUILD_TESTING then SPDLOG_BUILD_TESTING will be set to ON by default.
This way one can disable all external tests by setting BUILD_TESTING before using add_subdirectory and then setting it back to its original value.
The only change for those using the library directly is that they now use BUILD_TESTING instead of SPDLOG_BUILD_TESTING when configuring.
2017-08-23 15:12:40 +02:00
Bartosz Taczała
50c181ea4b Add prefix for BUILD_TESTING cmake option
This is helpful when using spdlog as a dependency (git submodule) when a
master project is not interested in spdlog tests. Using
"BUILD_TESTING" name may create a confusion.
Extra: BUILD_EXAMPLE variable already have a prefix.
2017-01-11 09:32:55 +01:00
Jan Kundrát
f058d3aa74 cmake: use -Wall on GCC and Clang
These checks come from [1]. The `MATCHES` operator is used for clang
because of Apple's special string.

[1] http://stackoverflow.com/questions/10046114/in-cmake-how-can-i-test-if-the-compiler-is-clang/10055571#10055571
2016-11-22 10:31:01 +01:00
Jan Kundrát
1c31800210 cmake: Use a standard option for controlling the tests
As per the docs [1], there's a standard variable for this purpose. This
introduces a behavior change, the tests are now being built by default.

[1] https://cmake.org/cmake/help/v3.0/module/CTest.html
2016-11-22 10:20:13 +01:00
Jan Kundrát
61cdd170fd cmake: List spdlog's content in IDEs
This is a usual CMake way of ensuring that IDEs have a way of showing
all source files which comprise this header-only library. It works in
the Qt Creator, for example.
2016-11-22 10:10:52 +01:00
Gabi Melman
3aef25c948 Update CMakeLists.txt 2016-07-10 00:08:43 +03:00
Kevin M. Godby
24e7b64b89 Added header-dependency tests. 2016-06-17 00:55:05 -05:00
Gabi Melman
6d5bce46f8 Revert "CMake script improvements" 2016-05-05 10:19:32 +03:00
Kevin M. Godby
2132fe0ec5 Initial work on benchmarks of other logging systems. 2016-05-04 22:46:30 -05:00
Kevin M. Godby
846fdf9f5c Added ctest so we now have a 'make test' target for running tests. 2016-05-04 19:55:00 -05:00
Kevin M. Godby
2666b6cbf1 Added header dependency tests. 2016-05-04 19:24:17 -05:00
Nick White
b7e3a103c3 Generate & Install pkg-config File 2016-04-14 20:47:57 +01:00
gabime
495ecaeaee astyle 2016-04-03 02:14:54 +03:00
Kevin M. Godby
9afc960d88 Enforce C++11 standard. 2016-03-18 13:07:44 -05:00
Gabi Melman
1725b7a6e2 update to MIT license 2015-11-28 19:19:55 +02:00
Ruslan Baratov
c19d9759d5 Add CMake build 2015-09-10 23:22:18 +03:00