Commit Graph

273 Commits

Author SHA1 Message Date
Spiros Tsalikis
3def950b84 Set FMT_CAN_MODULE=OFF for MSVC 19.29.30035+ 2021-07-23 09:35:09 -07:00
Владислав Щапов
fd16bcb20c Fix bug in cmake join function 2021-06-24 09:10:53 -07:00
Victor Zverovich
ff37e41625 wchar.h -> xchar.h because it handles other code unit types too 2021-05-29 09:37:17 -07:00
Jose Miguel Pérez
17c993c753
Fixed compilation with CMake < 3.7 (#2321) 2021-05-28 20:24:31 -07:00
Sergiu Deitsch
128cbdeb2f cmake: hide private symbols by default 2021-05-21 08:25:08 -07:00
Daniela Engert
5a0d99fa0b Add a test for the module 2021-05-20 10:26:31 -07:00
Victor Zverovich
0dd91e20d5 Add wchar.h for wide char overloads 2021-05-17 21:59:10 -07:00
Victor Zverovich
bb006f9735 Replace TYPED_TEST_CASE with TYPED_TEST_SUITE 2021-04-24 17:46:49 -07:00
Victor Zverovich
8f9ddf452d Remove deprecated posix.h 2021-04-24 07:03:11 -07:00
Dan Ibanez
58aa04573f
Fix ordering of install commands for CMake (#2122)
the library itself needs to be installed before
the fmt-targets.cmake file is installed,
otherwise the installed targets file doesn't
actually point to the library using
IMPORTED_LOCATION
2021-01-30 09:03:55 -08:00
randomizedthinking
6972b5f3d2
Add build variable: FMT_MASTER_PROJECT (#2100) 2021-01-16 16:56:49 -08:00
Victor Zverovich
ac35208115 Install fmt/args.h (#2096) 2021-01-16 08:13:38 -08:00
Jonathan Gopel
eb52ac7a35 🆕 Enable -Wshadow in pedantic mode
Problem:
- All `-Wshadow` warnings are fixed but there is nothing stopping them
  from being reintroduced.

Solution:
- Fail pedantic builds on `-Wshadow` warnings. This allows CI to prevent
  reoccurrence of the warning.

Notes:
- Not enabling `-Wshadow` for gcc versions 4 or lower because the
  warning is much more aggressive there to the point that it's mostly
  just noise.
2020-11-03 07:30:27 -08:00
Victor Zverovich
2f448ed565 Fix fuzzer timeouts 2020-10-12 16:46:21 -07:00
Victor Zverovich
af28305961 Cleanup 2020-10-11 10:13:42 -07:00
MarcDirven
01c37e0a4b
Added check for -mbig-obj and ref qualifier check (#1929)
* Added check whether mingw has -mbig-obj flag
* Removed ref qualifiers
2020-10-11 07:49:54 -07:00
Victor Zverovich
34f22e88a1 Cleanup CMake config 2020-10-07 08:11:42 -07:00
medithe
951e0d2333
CMakeLists.txt: Added Wundef warning to clang and gcc. (#1823)
Co-authored-by: Martin Wührer <martin.wuehrer@artech.at>
2020-08-18 07:04:44 -07:00
medithe
f9f02df719
CMakeLists.txt: Clang-warnings: removed -Wno-sign-conversion (#1817)
* CMakeLists.txt: Clang-warnings: removed -Wno-sign-conversion

* test/ranges-test.cc: changed type of integer literals to unsigned

* test/format-test.cc: fixed implicit conversion changes signedness warning in clang

Co-authored-by: Martin Wührer <martin.wuehrer@artech.at>
2020-08-14 13:58:20 -07:00
Victor Zverovich
61602a75db Remove -Wno-shadow 2020-08-05 10:55:09 -07:00
Raul Tambre
26b47b6fb5 Bump tested CMake version to 3.18
Use the version range feature introduced in 3.12. On CMake <3.12 the extra dots are simply interpreted as extra version number separators.
The fallback for ancient CMake versions is kept.
2020-07-19 08:50:34 -07:00
Victor Zverovich
18024853b6 Fix compatibility with CMake 3.4 (#1779) 2020-07-17 06:41:25 -07:00
Victor Zverovich
a2c4fed981 Double buffering no more 2020-07-10 20:35:14 -07:00
ArthurSonzogni
b287c37c65 Do not use -Wl,--as-needed with emscripten.
On some platform, fmt is using the following link flag:
```cmake
  target_link_libraries(fmt -Wl,--as-needed)
```

This is not supported by wasm-ld as of today.
This patch stop using it when compiling using emscripten.

Bug: https://github.com/fmtlib/fmt/issues/1736
2020-06-21 11:46:04 -07:00
flagarde
704ed557a1 Move project in order to solve a CMake warning
CMake Warning (dev) at /usr/share/cmake-3.17/Modules/GNUInstallDirs.cmake:225 (message):
  Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
  target architecture is known.  Please enable at least one language before
  including GNUInstallDirs.
2020-06-12 06:04:31 -07:00
Attila Mark
47ae521557 MINGW cross compiler fixes 2020-06-09 06:19:22 -07:00
Orivej Desh
f5fa1dee54
Support custom FMT_INC_DIR in pkgconfig and cmake configs (#1702)
* Support custom FMT_INC_DIR in pkgconfig and cmake configs

When CMAKE_INSTALL_INCLUDEDIR or FMT_INC_DIR override the header
installation directory, they should be used instead of
${CMAKE_INSTALL_PREFIX}/include in fmt-targets.cmake and fmt.pc.

* Put headers into FMT_INC_DIR/fmt rather than directly into FMT_INC_DIR

This makes FMT_INC_DIR an alias for CMAKE_INSTALL_INCLUDEDIR and
simplifies generation of pkgconfig and cmake configs.

* Do not split target_include_directories
2020-05-28 08:17:34 -07:00
Jan Tojnar
78f041ab5b build: Fix installation paths
It is not generally true that `CMAKE_INSTALL_<dir>` variables are relative paths:

https://github.com/jtojnar/cmake-snips#concatenating-paths-when-building-pkg-config-files
2020-05-01 10:27:24 -07:00
Krzysztof Wesolowski
e2ef12a8c0 Allow to avoid inclusion of os.cc in fmt target
- Allows to avoid part of #1654
- Not possible to use with MASTER_PROJECT as testing uses it a lot
2020-05-01 06:24:22 -07:00
asraa
e2ff910675
Replace FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION with fmt-specific macro (#1650)
Signed-off-by: Asra Ali <asraa@google.com>
2020-04-29 09:12:43 -07:00
Victor Zverovich
52d0e1bbe3 Don't use properties when setting FMT_LIB_NAME 2020-03-19 08:35:09 -07:00
Attila M. Szilagyi
5d32ccfc31
Add back missing OUTPUT_NAME in target properties. (#1598) 2020-03-19 07:01:51 -07:00
Victor Zverovich
6f01b6ebb6 Fix a typo in CMake config: STRINGS -> STRING 2020-03-14 09:50:25 -07:00
Laurent Stacul
1c0c59d4a0 Fix empty debug postfix 2020-03-09 08:34:02 -07:00
Victor Zverovich
48e8d0ebef set_doc -> set_verbose 2020-03-07 14:31:39 -08:00
Victor Zverovich
ce00979152 Cleanup CMake config 2020-03-07 08:18:01 -08:00
Victor Zverovich
0c6919ec72 Make FMT_DEBUG_POSTFIX a cache variable (#1566) 2020-03-04 08:37:11 -08:00
Jordan Williams
c54cd71800 only modify CMAKE_RUNTIME_OUTPUT_DIRECTORY if it is not already set 2020-02-07 07:10:03 -08:00
Victor Zverovich
43e9b29e50 Only use compiler features if available 2020-02-06 15:43:33 -08:00
Attila Mark
6c30f41443 Configure fmt.pc library name correctly.
Simplify getting library name.

Add FMT_DEBUG_SUFFIX variable.
2020-01-26 19:48:14 -08:00
Victor Zverovich
da2569827e posix.cc -> os.cc 2019-12-15 12:36:15 -08:00
Victor Zverovich
35959a31d7 Move OS-specific APIs to a separate header 2019-12-15 11:46:45 -08:00
Victor Zverovich
fd52de0c6b Add FMT_CUDA_TEST CMake option to enable cuda-test 2019-12-09 07:30:34 -08:00
Robert Franke
159f89e2b8 Fixing installation directory of '*.dll' files on Windows 2019-12-01 14:36:21 -08:00
Victor Zverovich
3de36e9348 Enable -Wswitch-enum in CI 2019-11-26 10:17:48 -08:00
Victor Zverovich
092d2dc7b2 Merge safe-duration-cast.h into chrono.h 2019-11-20 08:05:18 -08:00
Victor Zverovich
dcde089b4e Improve POSIX API detection 2019-11-15 07:28:02 -08:00
Deniz Evrenci
96f91428c6 Add defaulted copy and move operations to format_error and system_error (#1347)
* Avoid weak vtables by providing a private virtual member function

* Add warning Wweak-vtables to clang when FMT_PEDANTIC is on

* Add defaulted copy and move operations to format_error and system_error

Compiler generated copy operations are deprecated and move operations
are not generated altogether.

* Add warning Wdeprecated to clang when FMT_PEDANTIC is on
2019-10-11 10:44:20 -07:00
Vedran Miletić
f7aedc5fc4 Fix shared build on Solaris 2019-09-19 14:12:03 -07:00
Victor Zverovich
9393fe26f6 prepare -> compile 2019-07-25 19:39:41 +03:00