V2.x no std format (#3271)

* Removed SPDLOG_USE_STD_FORMAT

* Removed SPDLOG_USE_STD_FORMAT

* clang-format

* Fix windows.yml ci

* Fix ci
This commit is contained in:
Gabi Melman
2024-11-29 15:25:29 +02:00
committed by GitHub
parent 9fea0e5fa8
commit 63535f140b
21 changed files with 76 additions and 273 deletions

View File

@@ -1,15 +1,13 @@
include(FetchContent)
FetchContent_Declare(
fmt
DOWNLOAD_EXTRACT_TIMESTAMP FALSE
URL https://github.com/fmtlib/fmt/archive/refs/tags/11.0.2.tar.gz
URL_HASH SHA256=6cb1e6d37bdcb756dbbe59be438790db409cdb4868c66e888d5df9f13f7c027f)
fmt DOWNLOAD_EXTRACT_TIMESTAMP FALSE URL https://github.com/fmtlib/fmt/archive/refs/tags/11.0.2.tar.gz
URL_HASH SHA256=6cb1e6d37bdcb756dbbe59be438790db409cdb4868c66e888d5df9f13f7c027f)
FetchContent_GetProperties(fmt)
if(NOT fmt_POPULATED)
FetchContent_Populate(fmt)
# We do not require os features of fmt
set(FMT_OS OFF CACHE BOOL "Disable FMT_OS" FORCE)
add_subdirectory(${fmt_SOURCE_DIR} ${fmt_BINARY_DIR})
set_target_properties(fmt PROPERTIES FOLDER "third-party")
endif ()
set_target_properties(fmt PROPERTIES FOLDER "third-party")
endif()

View File

@@ -7,10 +7,7 @@ include(CMakeFindDependencyMacro)
find_package(Threads REQUIRED)
set(SPDLOG_USE_STD_FORMAT @SPDLOG_USE_STD_FORMAT@)
if(NOT SPDLOG_USE_STD_FORMAT)
find_dependency(fmt CONFIG)
endif()
find_dependency(fmt CONFIG)
set(config_targets_file @config_targets_file@)
include("${CMAKE_CURRENT_LIST_DIR}/${config_targets_file}")

View File

@@ -27,9 +27,5 @@
// Disable default logger creation
#cmakedefine SPDLOG_DISABLE_DEFAULT_LOGGER
// Use std::format instead of fmtlib
#cmakedefine SPDLOG_USE_STD_FORMAT
// Use external fmtlib instead of bundled
#cmakedefine SPDLOG_FMT_EXTERNAL