easyloggingpp
easyloggingpp copied to clipboard
Add shared library support and fix library install path on Linux
This is a
- [ ] Breaking change
- [x] New feature
- [x] Bugfix
I have
- [x] Merged in the latest upstream changes
- [x] Updated
CHANGELOG.md
- [x] Updated
README.md
- [x] Run the tests
This PR uses the major version number as the SOVERSION
, which presumes that no ABI-breaking changes will be made without bumping the major version.
I see two test failures, neither of which was introduced by this PR:
[ RUN ] CommandLineArgsTest.LoggingFlagsArg
/home/ben/src/forks/easyloggingpp/test/command-line-args-test.h:50: Failure
Value of: Loggers::hasFlag(LoggingFlag::NewLineForContainer)
Actual: true
Expected: false
/home/ben/src/forks/easyloggingpp/test/command-line-args-test.h:51: Failure
Value of: Loggers::hasFlag(LoggingFlag::LogDetailedCrashReason)
Actual: true
Expected: false
[ FAILED ] CommandLineArgsTest.LoggingFlagsArg (0 ms)
[ RUN ] HelpersTest.ConvertTemplateToStdString
/home/ben/src/forks/easyloggingpp/test/helpers-test.h:15: Failure
Expected equality of these values:
"[1, 2, 3, 4]"
strVecInt
Which is: "[1\n 2\n 3\n 4]"
With diff:
@@ -1,1 +1,4 @@
-[1, 2, 3, 4]
+[1
+ 2
+ 3
+ 4]
[ FAILED ] HelpersTest.ConvertTemplateToStdString (0 ms)
Upon further investigation, given the number of configuration preprocessor macros affecting the compilation of the .cc
file and intended to be set by the library user, it may not be practical to package this as a system-wide shared (or static) library for general use.
I think I will try to follow other distributions’ lead in packaging this as a header-only library, where the .cc
file is “also a header” to be installed in, e.g., /usr/include/
.
I will leave the PR here in case it is useful anyway…