abumq / easyloggingpp

C++ logging library. It is extremely powerful, extendable, light-weight, fast performing, thread and type safe and consists of many built-in features. It provides ability to write logs in your own customized format. It also provide support for logging your classes, third-party libraries, STL and third-party containers etc.
MIT License
3.75k stars 918 forks source link

Add options to CMake build script for adding definitions #826

Open geirhei opened 1 year ago

geirhei commented 1 year ago

Several options are added in the CMakeLists.txt from CCI used when creating the conan package: https://github.com/conan-io/conan-center-index/pull/14332/files#diff-ea375b62cb31e3394d050d0bb1267949c9abe74b84e714056725e1a28ce4ce3fR35

They should instead be included in the build script for this project so that they are available to others as well. For instance:

option(disable_logs "Disables all logs" OFF)
if (disable_logs)
    add_definitions(-DELPP_DISABLE_LOGS)
endif()

Should also fix https://github.com/amrayn/easyloggingpp/issues/812