use spdlog for logging in ws + unittest + remove un-needed mutex
This commit is contained in:
31
third_party/spdlog/cmake/Config.cmake.in
vendored
Normal file
31
third_party/spdlog/cmake/Config.cmake.in
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
# *************************************************************************/
|
||||
# * Copyright (c) 2015 Ruslan Baratov. */
|
||||
# * */
|
||||
# * Permission is hereby granted, free of charge, to any person obtaining */
|
||||
# * a copy of this software and associated documentation files (the */
|
||||
# * "Software"), to deal in the Software without restriction, including */
|
||||
# * without limitation the rights to use, copy, modify, merge, publish, */
|
||||
# * distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
# * permit persons to whom the Software is furnished to do so, subject to */
|
||||
# * the following conditions: */
|
||||
# * */
|
||||
# * The above copyright notice and this permission notice shall be */
|
||||
# * included in all copies or substantial portions of the Software. */
|
||||
# * */
|
||||
# * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
# * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
# * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
|
||||
# * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
# * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
# * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
# * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
# *************************************************************************/
|
||||
|
||||
set(SPDLOG_FMT_EXTERNAL @SPDLOG_FMT_EXTERNAL@)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake")
|
||||
|
||||
if(SPDLOG_FMT_EXTERNAL)
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(fmt CONFIG)
|
||||
endif()
|
21
third_party/spdlog/cmake/sanitizers.cmake
vendored
Normal file
21
third_party/spdlog/cmake/sanitizers.cmake
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
if(SPDLOG_SANITIZE_THREAD AND SPDLOG_SANITIZE_ADDRESS)
|
||||
message(FATAL_ERROR "AddressSanitizer is not compatible with ThreadSanitizer.")
|
||||
endif()
|
||||
|
||||
if(SPDLOG_SANITIZE_ADDRESS)
|
||||
message(STATUS "AddressSanitizer enabled")
|
||||
set(SANITIZER_FLAGS "-fsanitize=address,undefined")
|
||||
add_compile_options("-fno-sanitize=signed-integer-overflow")
|
||||
endif()
|
||||
|
||||
if(SPDLOG_SANITIZE_THREAD)
|
||||
message(STATUS "ThreadSanitizer enabled")
|
||||
set(SANITIZER_FLAGS "-fsanitize=thread")
|
||||
endif()
|
||||
|
||||
if(SPDLOG_SANITIZE_THREAD OR SPDLOG_SANITIZE_ADDRESS)
|
||||
add_compile_options(${SANITIZER_FLAGS})
|
||||
add_compile_options("-fno-sanitize-recover=all")
|
||||
add_compile_options("-fno-omit-frame-pointer")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SANITIZER_FLAGS} -fuse-ld=gold")
|
||||
endif()
|
6
third_party/spdlog/cmake/spdlog.pc.in
vendored
Normal file
6
third_party/spdlog/cmake/spdlog.pc.in
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: @PROJECT_NAME@
|
||||
Description: Super fast C++ logging library.
|
||||
Version: @PROJECT_VERSION@
|
Reference in New Issue
Block a user