Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2.x deprecated #3268

Closed
wants to merge 335 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
335 commits
Select commit Hold shift + click to select a range
31a7dc6
Fix atomic level
gabime Sep 22, 2023
7d9cf59
Fix atomic level
gabime Sep 22, 2023
5683d16
Fix atomic level
gabime Sep 22, 2023
e63d110
use constexpr for colors in ansicolor_sink
gabime Sep 22, 2023
e315bcb
Fix compilations in windows
gabime Sep 22, 2023
ea1c829
fix warning
gabime Sep 22, 2023
7c0afad
check SPDLOG_SOURCE_LOCATION in macros and in runtime
gabime Sep 22, 2023
2d801bb
Update comment
gabime Sep 22, 2023
433cac4
Renamed spdlog::log_level to spdlog::level and added some level tests
gabime Sep 23, 2023
9a7448e
Renamed to level_to_number
gabime Sep 23, 2023
7d3b5a1
Update wincolor_sink-inl.h
gabime Sep 23, 2023
9448d74
Fixed warning in tests
gabime Sep 23, 2023
73eb6bc
Replace static_cast with level_to_number in color sinks
gabime Sep 24, 2023
a34fb37
Added nodiscard to level_to_number()
gabime Sep 24, 2023
b16a895
Added more [[nodiscard]] to functions in common
gabime Sep 24, 2023
fc81e03
Removed SPDLOG_COMPILED_LIB/HEADER_ONLY macros from common.h
gabime Sep 24, 2023
6d520df
Removed header only options
gabime Sep 24, 2023
cff3e27
Removed usages of SPDLOG_COMPILED_LIB macro
gabime Sep 24, 2023
98dacff
Removed usages of SPDLOG_COMPILED_LIB macro
gabime Sep 24, 2023
425f137
glob .cpp in cmakelists
gabime Sep 24, 2023
9d04001
created sinks fmt and details folders in src
gabime Sep 24, 2023
ab86471
created sinks fmt and details folders in src
gabime Sep 24, 2023
2a1959c
wip static_only
gabime Sep 24, 2023
f3bf9e7
wip static_only
gabime Sep 24, 2023
5654205
updated template instantiations
gabime Sep 24, 2023
e28eadc
Clang format
gabime Sep 24, 2023
5e59b39
Update wincolor_sink.cpp
gabime Sep 24, 2023
9640378
Updated format.sh script
gabime Sep 24, 2023
66de161
fix fwd
gabime Sep 24, 2023
6de0ffa
Updated clang format to google style
gabime Sep 24, 2023
1797166
Fixed windows compile
gabime Sep 25, 2023
2896bbe
Never sort includes in clang format
gabime Sep 25, 2023
d1a47cd
Rename .helpers.cpp to helpers.cpp
gabime Sep 25, 2023
84bee1d
Update logger.cpp
gabime Sep 25, 2023
2ed4e16
Update logger.cpp
gabime Sep 25, 2023
218e859
Update scripts/format.sh
gabime Sep 25, 2023
dcd5904
Updated clang-format
gabime Sep 25, 2023
1800775
updated clang format
gabime Sep 25, 2023
f36b2c5
reformat code
gabime Sep 25, 2023
968048c
Fixed test
gabime Sep 25, 2023
6dffd7c
update clang format again
gabime Sep 25, 2023
7ac740a
Update common.h
gabime Sep 25, 2023
6eef69e
Update pattern_formatter.cpp
gabime Sep 25, 2023
60457b6
Update test_misc.cpp
gabime Sep 25, 2023
030bcb8
Update common.h
gabime Sep 25, 2023
605f037
Update pattern_formatter.cpp
gabime Sep 25, 2023
967554e
added comments
gabime Sep 25, 2023
4bb3b56
relative includes wip
gabime Sep 27, 2023
0773e11
relative includes wip
gabime Sep 27, 2023
976d3d2
Fixed ifdefs
gabime Sep 28, 2023
c1ffe29
Fixed include
gabime Sep 28, 2023
a393447
Relative include paths in headers
gabime Sep 28, 2023
a0e6318
Replaced include <spdlog/..> with include "spdlog/.."
gabime Sep 28, 2023
463af69
Clang format sort includes
gabime Sep 28, 2023
2bdddc6
minor cleanup
gabime Sep 28, 2023
857158d
minor cleanup
gabime Sep 28, 2023
4f36d19
Added missing include
gabime Sep 28, 2023
c542ef5
Added msvc include test
gabime Sep 28, 2023
c7b60db
Cleaned tests
gabime Sep 28, 2023
b169859
Removed unneeded ifdef around msvc sink
gabime Sep 28, 2023
8dc7ba7
Cleaned tests
gabime Sep 28, 2023
5abca17
Fixes wincolor_sink.cpp
gabime Sep 28, 2023
837fb9b
fix test_include_sinks.cpp
gabime Sep 28, 2023
9163bbd
Update win_eventlog_sink.h
gabime Sep 28, 2023
af83545
Update common.h
gabime Sep 29, 2023
2fb5e75
cmake message
gabime Sep 28, 2023
a8efa85
Remove global console mutex (wip)
gabime Oct 1, 2023
9390881
Retruned color codes to ansi-color header
gabime Oct 1, 2023
9a7a9f6
Removed ref from to_string_ in ansicolor sink
gabime Oct 1, 2023
2a101ac
Removed ref from to_string_ in ansicolor sink
gabime Oct 1, 2023
08648e5
Fixed wincolor sink
gabime Oct 1, 2023
cc343cd
CMakeLists.txt: set source groups for visual studio
gabime Oct 1, 2023
9b3a4e2
Copy spdlog dll to the executable folder for example, tests and bench
gabime Oct 1, 2023
2b88112
Copy spdlog dll to the executable folder for example, tests and bench
gabime Oct 1, 2023
eb25682
Fixed nodiscard location
gabime Oct 1, 2023
754838c
Fixed template instantiations in ansicolor_sink.cpp
gabime Oct 1, 2023
5786827
clang format
gabime Oct 1, 2023
bd00a00
fix typo in comment
gabime Oct 1, 2023
61b11e7
constexpr support for source location without leading directory
gabime Oct 1, 2023
5309ddb
Better handle version.rc and source group for vs
gabime Oct 2, 2023
69dd70e
Replace glob sources with explict file list in CMakeLists.txt
gabime Oct 2, 2023
f5c927b
Delete cmake/pch.h.in
gabime Oct 2, 2023
0fd0e13
Update CMakeLists.txt - removed pch option
gabime Oct 2, 2023
7ba9a04
Update bundled_fmtlib_format.cpp
gabime Oct 2, 2023
b1b6a22
Update fmt.h
gabime Oct 2, 2023
c10acd2
Update fmt.h
gabime Oct 2, 2023
ef10d4b
CMakeLists.txt - removed pch support
gabime Oct 2, 2023
ec523b9
Added comment about log_msg_buffer
gabime Oct 1, 2023
ecb29c4
Removed pre compiled header option
gabime Oct 1, 2023
82a672a
Removed console_globals.h file
gabime Oct 6, 2023
959244b
Fix OS availability check of pthread_threadid_np for iOS (#2897)
lowdesertpunk Oct 11, 2023
5782891
Removed SPDLOG_FMT_RUNTIME definition
gabime Oct 21, 2023
70f7a82
Always <format> if SPDLOG_USE_STD_FORMAT defined
gabime Oct 21, 2023
bc7e80c
Removed include null_mutex.h from common.h
gabime Oct 21, 2023
83d5f3d
Revert 70f7a8252d0a4284d7d05c305648798843f50d23
gabime Oct 21, 2023
efcca40
Fix wrong thread_id (TID) in systemd_sink.h (#2919)
M010 Oct 23, 2023
d53e8ab
sinks: Make syslog_sink.h's syslog_prio_from_level protected (#2918)
shannonbooth Oct 23, 2023
9797b35
fmt/*.h: include tweakme.h to set SPDLOG_FMT_EXTERNAL according to sy…
marcusmueller Oct 25, 2023
8590436
Fixed example
gabime Dec 22, 2023
eb7d876
Fixed example
gabime Dec 22, 2023
f9c9f5c
Updated readme install instructions
gabime Dec 22, 2023
1161d64
Removed bundled fmtlib. Use FetchContent instead
gabime Dec 22, 2023
d03d514
Use fmt git hash and disable FMT_OS
gabime Dec 22, 2023
d10bef5
Use git hash to catch2 fetch
gabime Dec 22, 2023
235e12c
Bump to catch2 v3.5.0
gabime Dec 22, 2023
15ee3f7
Updated spdlogConfig.cmake
gabime Dec 22, 2023
d0c30a6
Use fmt only if not SPDLOG_USE_STD_FORMAT is ON
gabime Dec 23, 2023
c6206a3
Always build static fmtlib version and fix fpic
gabime Dec 23, 2023
ea66477
Copy dlls to the executable folder for msvc
gabime Dec 23, 2023
ffbdc8f
remove SPDLOG_BUILD_PIC cmake option
gabime Dec 23, 2023
3fe640e
Remove static lib enforement of fmt
gabime Dec 23, 2023
3b93c53
If SPDLOG_BUILD_SHARED is set, set BUILD_SHARED_LIBS to ON as well
gabime Dec 23, 2023
8a0f874
Updated cmake messages
gabime Dec 23, 2023
90c5055
place dlls in the same directory as the executables on msvc
gabime Dec 24, 2023
f4204e0
Clean cmake
gabime Dec 24, 2023
4813a12
Clean appveyor
gabime Dec 24, 2023
8c3ff3a
Clean appveyor
gabime Dec 24, 2023
306ddde
Fix cmake for msvc
gabime Dec 24, 2023
70f397f
Cmake use FOLDER third-party for third party libs
gabime Dec 24, 2023
7e3700f
force constexpr of empty source_loc
gabime Dec 24, 2023
68e71cf
Revert "force constexpr of empty source_loc"
gabime Dec 24, 2023
2a4aa8f
Fixed stopwatch test
gabime Dec 24, 2023
944a542
Update fmt LICENSE link
gabime Jan 1, 2024
ae0eb75
Update no exception flag in CMakeLists.txt for msvc
gabime Jan 9, 2024
3379f24
Check fd_ is not nullptr in file_helper
gabime Jan 12, 2024
45b100c
Update gitignore
gabime Jan 12, 2024
a3e0533
Removed fmt wrapper files
gabime Jan 12, 2024
feaab0d
Use relative include files
gabime Jan 12, 2024
24fe442
Use relative includes and create spdlog_config.h
gabime Jan 12, 2024
4789065
Remove custom level names from macro
gabime Jan 13, 2024
77b07b3
clang format
gabime Jan 13, 2024
f70670d
Removed SPDLOG_EOL define
gabime Jan 13, 2024
e2e8099
Init cached_tm with {}
gabime Jan 13, 2024
947b42b
Init last_log_secs_ with {}
gabime Jan 13, 2024
1ce7f5e
Update spdlog_config.h template
gabime Jan 13, 2024
aa5d9af
Bump fmt to 10.2.1
gabime Jan 13, 2024
287d83a
Removed unused include
gabime Jan 13, 2024
efa89d0
Add fmt dep to cmake install
gabime Jan 13, 2024
3834b91
Fixed spdlogConfig.cmake.in fmt dep
gabime Jan 13, 2024
32d83ee
Fix text in cpack
gabime Jan 13, 2024
e6e2ffb
Fixed pkg-config
gabime Jan 13, 2024
26b6461
Fixed pkgconfig
gabime Jan 13, 2024
83d274e
Fix spdlogConfig.cmake.in
gabime Jan 13, 2024
d513f44
Fix cmake install again
gabime Jan 13, 2024
eaab457
Fixed cmake install
gabime Jan 13, 2024
c539f36
clang format
gabime Jan 13, 2024
ce3922c
Fix some typos
gabime Jan 13, 2024
91bf60a
Check rv of localtime_r
gabime Jan 13, 2024
aaebfbb
Fixd some clang-tidy warnings
gabime Jan 13, 2024
6c799d0
Fix localtime_s()usage
gabime Jan 13, 2024
3954cac
Clean os.h macros
gabime Jan 14, 2024
885b796
Refactored os.cpp to os_unix.cpp and os_windows.cpp
gabime Jan 14, 2024
9294adb
Fixed os_windows.cpp
gabime Jan 14, 2024
d61f0a5
Fix include paths
gabime Jan 14, 2024
fbd1ebc
Fixed format.sh script
gabime Jan 14, 2024
0992a41
Cleaned os.h
gabime Jan 14, 2024
e96cb12
Fixed cmakelists
gabime Jan 14, 2024
9622d7f
Fixed cmakelists
gabime Jan 14, 2024
77d350a
Refactored cmake
gabime Jan 14, 2024
69d412b
Format code of wincolor_sink.cpp
gabime Jan 14, 2024
5370076
Update CMakeLists.txt (#3028)
loject Mar 3, 2024
f743a88
merge pull #2978
gabime Jan 14, 2024
95587b7
Fix typo
gabime Jan 14, 2024
b05d936
Minor cleanup of includes
gabime Jan 14, 2024
286218a
Removed state from default error handler
gabime Oct 1, 2023
7bb480a
Minor clean
gabime Jan 14, 2024
bb687e7
Minor clean
gabime Jan 14, 2024
57384f7
Minor clean
gabime Jan 14, 2024
7bd1c1e
Removed unused source file
gabime Jan 14, 2024
c8b81a6
Minor style
gabime Jan 14, 2024
8319d1b
clang format
gabime Jan 14, 2024
989589d
Minor style
gabime Jan 14, 2024
34e0c8f
Minor style
gabime Jan 14, 2024
e9938a8
Fetch fmt 10.2.1.tar.gz and check sha256
gabime Mar 16, 2024
276788a
Update comment
gabime Mar 16, 2024
c923915
DOWNLOAD_EXTRACT_TIMESTAMP FALSE when fetching fmt
gabime Mar 16, 2024
a145ba6
Fixed fmt cmake
gabime Mar 16, 2024
c577b54
Fix typos found by codespell (#3011)
DimitriPapadopoulos Feb 12, 2024
dd8dc81
Expose the flusher thread object to user in order to allow setting of…
cohdan Feb 14, 2024
167bf98
support MINGW (#3022)
NU-LL Feb 25, 2024
8e10782
Ported pull #3023 with some changes and tests
gabime Mar 16, 2024
87b8401
Add missing include (#3026)
magnus-nomono Mar 10, 2024
5a207ad
Update stopwatch.h (#3034)
brodao2 Mar 9, 2024
50d7f59
Fixed bench dev_null
gabime Mar 16, 2024
232aace
added spdlog::get(..) benchmarks
gabime Mar 16, 2024
ca7c846
Fixed warning
gabime Mar 16, 2024
8a4f3b1
Small clean in registry impl
gabime Mar 16, 2024
e750d22
Small clean in registry impl
gabime Mar 16, 2024
06e4631
Use find if registry is bigger than 20
gabime Mar 16, 2024
4a31ed3
if the map is small do a sequential search, otherwise use the standar…
gabime Mar 16, 2024
b95e493
Reduce max size for sequential map search to 10
gabime Mar 16, 2024
e1f5a45
Added small_map_threshold constexpr
gabime Mar 16, 2024
8f526df
Update latency test
gabime Mar 16, 2024
1bde483
Fixed registry impl
gabime Mar 16, 2024
390428a
Fixed path_exists(..) in windows
gabime Mar 16, 2024
a627f5c
Apply #3044 pr
gabime Mar 22, 2024
8815f81
Added mdc from pull #2907
gabime Mar 29, 2024
02c3ca5
Upadate mdc code in pattern_formatter.cpp
gabime Mar 29, 2024
8d6a121
Added mdc.h
gabime Mar 29, 2024
aefd451
Update README.md
gabime Mar 29, 2024
f0b96d2
Update mdc.h
gabime Mar 29, 2024
d60a4c7
Don't remove existing logger from registry in set_default_logger
gabime May 3, 2024
d896dae
README.md has include missing (#3066)
darallium Apr 25, 2024
01646c5
Updated ci for macOS
gabime May 3, 2024
587b7da
Revert "Updated ci for macOS"
gabime May 3, 2024
4ee5080
Removed unused include
gabime May 3, 2024
15829cf
Added final keywords to sinks and pattern_formatter.cpp
gabime May 3, 2024
06be440
clang-format
gabime May 3, 2024
8d81cca
constexpr in tcp_client_unix
gabime May 3, 2024
7ea98fb
Removed unused includes
gabime May 3, 2024
dc24a85
Removed redundant inline keyword
gabime May 3, 2024
5559847
Removed unused include
gabime May 3, 2024
085e133
Remove unneeded inline from template function
gabime May 3, 2024
9df7863
Remove unneeded inline from template function
gabime May 3, 2024
f9566a0
Remove unneeded inline from template function
gabime May 3, 2024
ffa651d
update ci osx
gabime May 3, 2024
dec6a3f
Fix android_sink header include wrong path (#3113)
act262 Jun 17, 2024
8888f58
Allow customization of syslog_sink (#3124)
Silex Jul 3, 2024
5884f4d
Fix var name
gabime Nov 25, 2024
754be3e
Fix #3079
gabime Nov 25, 2024
8d9283d
Upadted test_create_dir
gabime Nov 25, 2024
c1f101a
make example compatible with fmt 11 (#3130)
gabime Nov 25, 2024
a2de136
Backported FMT_STRING
gabime Nov 25, 2024
04bd12e
fix: set and to MSVC only (#3139)
gabime Nov 25, 2024
e01fa1a
compilation error gcc 8.5 with [-Werror=suggest-override] (#3158)
gabime Nov 25, 2024
15fcde8
Add info about max_files in the docstrings of hourly/daily file sinks…
themightyoarfish Sep 9, 2024
a3d3df0
use std::lock_guard instead of std::unique_lock (#3179)
wsehjk Sep 11, 2024
4effc91
Update conan install command in README (#3172)
uilianries Sep 14, 2024
eab1f6d
Fix #3194 month name
gabime Nov 25, 2024
e4d81a5
Fix warning - extra ';' for -Wextra-semi (#3198)
hydai Sep 23, 2024
8563a6a
Improve Cross-Platform Build Instructions in Documentation (#3229)
Mq-b Oct 27, 2024
496c5fd
Bump fmt to 11.0.2
gabime Nov 25, 2024
0e95bba
Fixed race condition in tests
gabime Nov 1, 2024
c122eaf
Gabime/tsan (#3237)
gabime Nov 1, 2024
d94311a
Use std::string_view in level names and ansicolor_sink.h
gabime Nov 26, 2024
1d66ca8
Ported ci from v1.x branch
gabime Nov 26, 2024
419b4bd
Updated ci to use c++17
gabime Nov 26, 2024
d808eb8
fix comment
gabime Nov 26, 2024
30f0681
Fix windows ci
gabime Nov 26, 2024
850ee25
Commented out problematic gcc-9 log(..) overrides
gabime Nov 29, 2024
7c6512f
Fix ci
gabime Nov 29, 2024
24afd40
Fix ci
gabime Nov 29, 2024
905312e
Fixed build replaced string_view_t
gabime Nov 29, 2024
79422fe
Added missing include
gabime Nov 29, 2024
fba921b
Update windows.yml
gabime Nov 29, 2024
4b301e7
Update windows.yml
gabime Nov 29, 2024
9dab02a
Fix ci windows
gabime Nov 29, 2024
5c4f5f4
Fix ci windows
gabime Nov 29, 2024
89a01c4
Fix ci windows
gabime Nov 29, 2024
67628a4
Fix ci windows
gabime Nov 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 12 additions & 102 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,109 +1,19 @@
---
Language: Cpp
# BasedOnStyle: LLVM
BasedOnStyle: Google
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 140
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
Standard: c++17
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: true
SortIncludes: false
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 8
TabWidth: 4
UseTab: Never
IndentPPDirectives: AfterHash
ColumnLimit: 130
AlignAfterOpenBracket: Align
BinPackParameters: false
AlignEscapedNewlines: Left
AlwaysBreakTemplateDeclarations: Yes
PackConstructorInitializers: Never
BreakConstructorInitializersBeforeComma: false
IndentPPDirectives: BeforeHash
SortIncludes: CaseInsensitive
...

4 changes: 3 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ clang-analyzer-*,
-google-runtime-references,
-misc-non-private-member-variables-in-classes,
-readability-braces-around-statements,
-readability-identifier-length,
-google-readability-braces-around-statements,
-cppcoreguidelines-avoid-magic-numbers,
-readability-magic-numbers,
Expand All @@ -21,7 +22,8 @@ clang-analyzer-*,
-modernize-avoid-c-arrays,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-readability-named-parameter,
-cert-env33-c
-cert-env33-c,
-modernize-concat-nested-namespaces
'


Expand Down
55 changes: 30 additions & 25 deletions .github/workflows/ci.yml → .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
name: ci
name: linux

on: [push, pull_request]

permissions:
contents: read

jobs:
build_linux:
# -----------------------------------------------------------------------
# Linux build matrix
# -----------------------------------------------------------------------
build:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -12,31 +18,30 @@ jobs:
fail-fast: false
matrix:
config:
- { compiler: gcc, version: 7, build_type: Release, cppstd: 11 }
- { compiler: gcc, version: 9, build_type: Release, cppstd: 17 }
- { compiler: gcc, version: 11, build_type: Debug, cppstd: 20 }
- { compiler: gcc, version: 12, build_type: Release, cppstd: 20 }
- { compiler: clang, version: 12, build_type: Debug, cppstd: 17, asan: OFF }
- { compiler: clang, version: 15, build_type: Release, cppstd: 20, asan: OFF }
- { compiler: gcc, version: 12, build_type: Debug, cppstd: 20, asan: ON }
- { compiler: clang, version: 12, build_type: Debug, cppstd: 17 }
- { compiler: clang, version: 15, build_type: Release, cppstd: 20, tsan: ON }
container:
image: ${{ matrix.config.compiler == 'clang' && 'teeks99/clang-ubuntu' || matrix.config.compiler }}:${{ matrix.config.version }}
name: "${{ matrix.config.compiler}} ${{ matrix.config.version }} (C++${{ matrix.config.cppstd }}, ${{ matrix.config.build_type }})"
name: "${{ matrix.config.compiler}} ${{ matrix.config.version }} (C++${{ matrix.config.cppstd }} ${{ matrix.config.build_type }} ${{ matrix.config.asan == 'ON' && 'ASAN' || '' }}${{ matrix.config.tsan == 'ON' && 'TSAN' || '' }})"
steps:
- uses: actions/checkout@main
- uses: actions/checkout@v4
- name: Setup
run: |
apt-get update && apt-get install -y curl git pkg-config libsystemd-dev
apt-get update
apt-get install -y curl git pkg-config libsystemd-dev
CMAKE_VERSION="3.24.2"
curl -sSL https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh -o install-cmake.sh
chmod +x install-cmake.sh
./install-cmake.sh --prefix=/usr/local --skip-license
- name: Setup Compiler
if: matrix.config.compiler == 'clang'
run: |
if [[ "${{ matrix.config.version }}" -ge 4 ]]; then
scripts/ci_setup_clang.sh "${{ matrix.config.version }}"
echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV
fi
scripts/ci_setup_clang.sh "${{ matrix.config.version }}"
echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV
echo "CC=clang-${{ matrix.config.version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.config.version }}" >> $GITHUB_ENV
- name: Build
Expand All @@ -46,33 +51,33 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
-DCMAKE_CXX_STANDARD=${{ matrix.config.cppstd }} \
-DSPDLOG_BUILD_EXAMPLE=${{ matrix.config.examples || 'ON' }} \
-DSPDLOG_BUILD_EXAMPLE_HO=${{ matrix.config.examples || 'ON' }} \
-DSPDLOG_BUILD_WARNINGS=ON \
-DSPDLOG_BUILD_BENCH=OFF \
-DSPDLOG_BUILD_TESTS=ON \
-DSPDLOG_BUILD_TESTS_HO=OFF \
-DSPDLOG_SANITIZE_ADDRESS=${{ matrix.config.asan || 'ON' }}
make -j2
ctest -j2 --output-on-failure
-DSPDLOG_SANITIZE_ADDRESS=${{ matrix.config.asan || 'OFF' }} \
-DSPDLOG_SANITIZE_ADDRESS=${{ matrix.config.asan || 'OFF' }} \
-DSPDLOG_SANITIZE_THREAD=${{ matrix.config.tsan || 'OFF' }}
make -j 4
ctest -j 4 --output-on-failure

# -----------------------------------------------------------------------
# OS X build matrix
# -----------------------------------------------------------------------
build_osx:
runs-on: macOS-latest
name: "OS X Clang (C++11, Release)"
name: "OS X Clang (C++17, Release)"
steps:
- uses: actions/checkout@main
- uses: actions/checkout@v4
- name: Build
run: |
mkdir -p build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=11 \
-DCMAKE_CXX_STANDARD=17 \
-DSPDLOG_BUILD_EXAMPLE=ON \
-DSPDLOG_BUILD_EXAMPLE_HO=ON \
-DSPDLOG_BUILD_WARNINGS=ON \
-DSPDLOG_BUILD_BENCH=OFF \
-DSPDLOG_BUILD_TESTS=ON \
-DSPDLOG_BUILD_TESTS_HO=OFF \
-DSPDLOG_SANITIZE_ADDRESS=OFF
make -j2
ctest -j2 --output-on-failure

make -j 4
ctest -j 4 --output-on-failure
26 changes: 26 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: macos

on: [push, pull_request]

permissions:
contents: read

jobs:
build:
runs-on: macOS-latest
name: "macOS Clang (C++17, Release)"
steps:
- uses: actions/checkout@v4
- name: Build
run: |
mkdir -p build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DSPDLOG_BUILD_EXAMPLE=ON \
-DSPDLOG_BUILD_WARNINGS=ON \
-DSPDLOG_BUILD_BENCH=OFF \
-DSPDLOG_BUILD_TESTS=ON \
-DSPDLOG_SANITIZE_ADDRESS=OFF
make -j 4
ctest -j 4 --output-on-failure
Loading
Loading