Commit Graph

228 Commits

Author SHA1 Message Date
Gabi Melman
ebfa906952 CMake option to Enable/disable msvc /utf-8 flag (on by default) 2024-11-08 11:16:06 +02:00
Gabi Melman
d343d413c2 CMake option to Enable/disable msvc /utf-8 flag (on by default) 2024-11-08 11:09:05 +02:00
Gabi Melman
a5cfbf369d Revert "Better support for FMT_UNICODE in cmake"
This reverts commit d373093734.
2024-11-01 16:49:37 +02:00
Gabi Melman
d373093734 Better support for FMT_UNICODE in cmake 2024-11-01 16:44:15 +02:00
gabime
7a950e028c add /utf-8 flag for msvc 2024-11-01 15:18:44 +02:00
Gabi Melman
9fe79692eb
Gabime/tsan (#3237)
* Fixed race condition in tests

* Support for thread sanitizer
2024-11-01 15:14:27 +02:00
薛定谔的加菲猫
bdd1dff378
Update CMakeLists.txt, Fix spelling errors (#3193) 2024-09-18 20:25:46 +03:00
zjyhjqs
5ebfc92730
fix: set /Zc:__cplusplus and /MP to MSVC only (#3139)
1. macro `__cplusplus` is enabled by clang-cl
2. `/MP` is not supported by clang-cl (warning `-Wunused-command-line-argument` will be generated)
2024-07-22 13:37:28 +03:00
Dominik Grabiec
c3aed4b683
Add wide character formatting and output support to wincolor_sink. (#3092)
Fixes printing of unicode characters to the windows console such as microsecond suffix for std::chrono types.
2024-05-22 00:20:17 +03:00
gabime
e3f5a4fe66 Update cmake to define FMT_LIB_EXPORT when building shared lib 2024-04-25 18:21:21 +03:00
Gabi Melman
a2b4262090
Update CMakeLists.txt to fix #3029 2024-04-05 11:13:36 +03:00
spaceman
d387fdf96c
support MINGW (#3022)
Under Windows 10, compiling with MINGW64 will report an error similar to https://github.com/gabime/spdlog/issues/1581
2024-02-25 02:42:18 +02:00
Jeff
7cb90d1ab2
Fix MSVC compile flag for no exceptions (#2974) 2024-01-09 22:45:14 +02:00
gabime
a98d3ab0c7 clang format 2023-09-09 12:56:47 +03:00
gabime
7d0531b076 Removed policy_max from cmake_minimum_required(..) 2023-09-01 16:40:19 +03:00
albert-github
81ce5fcdb7
Remove obsolete part from cmake configuration files (#2871)
Updating minimum CMake version to 3.11
2023-08-30 23:20:37 +03:00
Robert Maynard
2312489bdc
Provide spdlog_header_only in build directory export (#2846)
Fixes #2678
2023-08-07 23:25:21 +03:00
moritz-h
371bc8ebe2
Set CMAKE_BUILD_TYPE only for single-config generators (#2839)
Thanks @moritz-h
2023-08-02 17:22:20 +03:00
gabime
64ed6b495c Revert "Fixed FMT_EXPORT to FMT_LIB_EXPORT in CMakeLists.txt"
This reverts commit c3fa8f60e2.
2023-07-08 13:44:27 +03:00
gabime
c3fa8f60e2 Fixed FMT_EXPORT to FMT_LIB_EXPORT in CMakeLists.txt 2023-07-02 21:24:35 +03:00
gabime
1f61f5e019 clang format 2023-06-07 13:23:44 +03:00
gabime
d1eb68154f If exceptions are disabled, disable them in the bundled fmt as well 2023-05-28 12:53:13 +03:00
Bailey Chittle
040874224b
setting the cmake standard to 20 when using std format (#2680) 2023-03-21 20:23:14 +02:00
Zeus James
da14258533
Fix MinGW build issue on example (#2642)
* Fix MinGW build issue on example #2638

* Move the cmake change to example\CMakeLists.txt

* Update CMakeLists.txt on the example
2023-02-12 10:34:22 +02:00
Darby Payne
edc51df1bd
Feature/add system includes option (#2575)
* Adding system includes option

* Adding system includes option
2022-12-11 10:58:02 +02:00
Charles Milette
4f80077339
Support compile-time format string checking with std::format (#2544)
* Support compile-time format string checking with std::format

* Fix pre-VS 17.5 compilation

* Fix compilation without wchar_t support

* What am I doing

* Bring back fmt optimization

* Move to_string_view to common.h

* Fix SPDLOG_CONSTEXPR_FUNC emitting duplicate symbol errors when building in C++11

* Also add inline on VS 2013

* Appender doesn't work on wide strings
2022-11-12 23:07:11 +02:00
gabime
3499dfeeb4 Bump bundled fmtlib to version 1.9.1 2022-10-31 13:47:47 +02:00
Puneet Matharu
7768c6271c Export targets to build directory so that it can be found at configure time. 2022-10-17 10:02:14 +01:00
Nigel Stewart
34f88d4382 cmake: SPDLOG_BUILD_PIC opt-in for CMAKE_POSITION_INDEPENDENT_CODE 2022-09-03 12:49:10 +10:00
Nigel Stewart
de67ebdda1 cmake: set(CMAKE_POSITION_INDEPENDENT_CODE ON) for Linux static library purposes 2022-09-02 12:08:42 +10:00
Hector PHARAM
fb3ddf749d Removed doc "(shared not supported in windows yet)" 2022-07-25 15:23:07 +02:00
cookcocck
ca747c7572 Set c++20 when SPDLOG_USE_STD_FORMAT option is turned on 2022-06-14 11:12:49 +08:00
Alexander Shpilkin
876880fb3f
Reflect CMAKE_INSTALL_INCLUDEDIR in pkg-config 2022-05-19 17:49:16 +03:00
Alexander Shpilkin
afb69071d5
Allow absolute CMAKE_INSTALL_LIBDIR 2022-05-19 17:48:57 +03:00
Jan Engelhardt
41efc971ad build: expand SOVERSION to not give false illusion of compatibility
Fixes #2369
2022-05-13 09:44:09 +02:00
Charless Milette
d75de3d3b2 Add SPDLOG_USE_STD_FORMAT to target_compile_definitions 2021-11-14 02:33:15 -05:00
Charless Milette
44a4517e2b Support C++20 std::format as an alternative to fmtlib 2021-11-13 11:29:05 -05:00
Cristian Morales Vega
ef540c1243 CMake: Stop explicitly setting CMP0077
The policy_max in cmake_minimum_required() already does that.
2021-09-08 16:45:04 +01:00
Cristian Morales Vega
8ffbc0f114 CMake: Specify "policy_max" 2021-09-08 16:44:13 +01:00
Dave Rigby
87095a9f1f Ensure exported package is relocatable
As per CMake's Importing and Exporting Guide[1],
configure_package_config_file() should be used for configuring the
package configuration file, not the regular configure_file() function.

This ensures that a spdlog package built on one system (with a given
directory tree) can be imported from a different system -
e.g. creating a pre-compiled spdlog package for use on different
systems.

[1]: https://cmake.org/cmake/help/git-stage/guide/importing-exporting/index.html#id8
2021-08-04 15:34:27 +01:00
gabime
b85a666f72 Enabled parallel build under msvc 2021-07-19 16:33:31 +03:00
gabime
e7e8b75a4c clang-format 2021-07-19 00:50:51 +03:00
gabime
7636f1f659 revert some changes made by mistake 2021-07-14 14:33:45 +03:00
gabime
1523c83650 Added fmt/compile.h bundled file 2021-07-14 14:28:34 +03:00
gabime
3eeced78b5 Removed some cmake wdev warnings 2021-07-10 15:15:39 +03:00
gabime
68aed6a5eb Fixed building under c++17 2021-06-26 17:36:57 +03:00
steven lunt
1bee3218b4 cleanup thanks to gabime 2021-05-19 17:51:03 -04:00
steven lunt
802eaadd2d add macros for overriding the individual level names 2021-05-19 10:45:33 -04:00
JB_12
181c22f798 Add support for CMake policy CMP0077 2021-05-16 22:49:02 +01:00
Chris Mc
65317eb019
Remove version requirement from fmt find_package
By introducing 'no module' support this inadvertently triggered the find_package to use the "full version" version selection.

From https://cmake.org/cmake/help/latest/command/find_package.html#version-selection:

> When the [version] argument is given, Config mode will only find a version of the package that claims compatibility with the requested version (see format specification).

FMT does not set this configuration https://github.com/fmtlib/fmt/blob/7.1.3/support/cmake/fmt-config.cmake.in... but regardless it would not be "any compatibility" based on version semantics.

Which causes this error. v1.8.2 builds perfectly fine.

```
CMake Error at CMakeLists.txt:181 (find_package):
  Could not find a configuration file for package "fmt" that is compatible
  with requested version "5.3.0".

  The following configuration files were considered but not accepted:

    /home/proj/build/e98598522b7c484d9220bffc7ec84474515facbc/fmt-config.cmake, version: 7.1.3
```
2021-03-24 21:54:36 -04:00