mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-22 10:37:10 +01:00
[spdlog] Update to 1.61 (#11793)
* [spdlog] Update to 1.61 * Modify the question * fixPortfile.camke * Update ports/spdlog/portfile.cmake * fixPortfile.cmake * Update ports/spdlog/portfile.cmake * Update ports/spdlog/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
This commit is contained in:
parent
5c9511e3a8
commit
ffe8f5d9b7
@ -1,5 +1,5 @@
|
||||
Source: spdlog
|
||||
Version: 1.4.2-1
|
||||
Version: 1.6.1
|
||||
Homepage: https://github.com/gabime/spdlog
|
||||
Description: Very fast, header only, C++ logging library
|
||||
Build-Depends: fmt
|
||||
|
@ -1,19 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 12320fb..70f611b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -33,13 +33,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
# Set SPDLOG_MASTER_PROJECT to ON if we are building spdlog
|
||||
#---------------------------------------------------------------------------------------
|
||||
# Check if spdlog is being used directly or via add_subdirectory, but allow overriding
|
||||
-if (NOT DEFINED SPDLOG_MASTER_PROJECT)
|
||||
- if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
|
||||
- set(SPDLOG_MASTER_PROJECT ON)
|
||||
- else()
|
||||
- set(SPDLOG_MASTER_PROJECT OFF)
|
||||
- endif()
|
||||
-endif ()
|
||||
+set(SPDLOG_MASTER_PROJECT OFF)
|
||||
|
||||
# build shared option
|
||||
if(NOT WIN32)
|
@ -1,15 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index cd17178..c9910e1 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -126,6 +126,10 @@ if(SPDLOG_FMT_EXTERNAL)
|
||||
|
||||
target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_FMT_EXTERNAL)
|
||||
target_link_libraries(spdlog_header_only INTERFACE fmt::fmt)
|
||||
+
|
||||
+ if (WIN32)
|
||||
+ target_compile_options(spdlog PRIVATE /wd4275)
|
||||
+ endif()
|
||||
|
||||
set(PKG_CONFIG_REQUIRES fmt) # add dependecy to pkg-config
|
||||
endif()
|
@ -1,14 +0,0 @@
|
||||
diff --git a/bench/CMakeLists.txt b/bench/CMakeLists.txt
|
||||
index d087cf6..86483db 100644
|
||||
--- a/bench/CMakeLists.txt
|
||||
+++ b/bench/CMakeLists.txt
|
||||
@@ -26,3 +26,8 @@ add_executable(formatter-bench formatter-bench.cpp)
|
||||
target_link_libraries(formatter-bench PRIVATE benchmark::benchmark spdlog::spdlog)
|
||||
|
||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")
|
||||
+
|
||||
+install(TARGETS bench async_bench latency
|
||||
+ RUNTIME DESTINATION tools/spdlog
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib)
|
||||
\ No newline at end of file
|
@ -1,12 +0,0 @@
|
||||
diff --git a/include/spdlog/common.h b/include/spdlog/common.h
|
||||
index e1108a0a..b4faf26e 100644
|
||||
--- a/include/spdlog/common.h
|
||||
+++ b/include/spdlog/common.h
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <functional>
|
||||
+#include <cassert>
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef NOMINMAX
|
@ -1,26 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 35425db..28c555a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -128,7 +128,7 @@ if(SPDLOG_FMT_EXTERNAL)
|
||||
target_link_libraries(spdlog_header_only INTERFACE fmt::fmt)
|
||||
|
||||
if (WIN32)
|
||||
- target_compile_options(spdlog PRIVATE /wd4275)
|
||||
+ target_compile_options(spdlog PRIVATE /wd4275 /wd4100)
|
||||
endif()
|
||||
|
||||
set(PKG_CONFIG_REQUIRES fmt) # add dependecy to pkg-config
|
||||
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h
|
||||
index f436b0d..82f3510 100644
|
||||
--- a/include/spdlog/details/os-inl.h
|
||||
+++ b/include/spdlog/details/os-inl.h
|
||||
@@ -128,7 +128,7 @@ SPDLOG_INLINE void prevent_child_fd(FILE *f)
|
||||
{
|
||||
|
||||
#ifdef _WIN32
|
||||
-#if !defined(__cplusplus_winrt)
|
||||
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
|
||||
auto file_handle = reinterpret_cast<HANDLE>(_get_osfhandle(_fileno(f)));
|
||||
if (!::SetHandleInformation(file_handle, HANDLE_FLAG_INHERIT, 0))
|
||||
SPDLOG_THROW(spdlog_ex("SetHandleInformation failed", errno));
|
@ -1,28 +1,21 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO gabime/spdlog
|
||||
REF 1549ff12f1aa61ffc4d9a8727c519034724392a0 #v1.4.2
|
||||
SHA512 c159aea475baecad0a5a9eef965856203c96aa855b0480e82d751bcc050c6e08bb0aa458544da061f5d744e17dcd27bd9b6e31a62d502834f02d3591f29febec
|
||||
REF 22a169bc319ac06948e7ee0be6b9b0ac81386604 #v1.6.1
|
||||
SHA512 29eac6f1be8d9fc08a257eab7f59cf70d63b2978fa4b8b63c825b39cf77f2505083bfd9db3fa2925739cea71d07986c022fc3d236cce351b3570d543f100a8a5
|
||||
HEAD_REF v1.x
|
||||
PATCHES
|
||||
disable-master-project-check.patch
|
||||
fix-feature-export.patch
|
||||
fix-error-4275.patch
|
||||
fix-uwp.patch
|
||||
fix-include.patch
|
||||
)
|
||||
|
||||
set(SPDLOG_USE_BENCHMARK OFF)
|
||||
if("benchmark" IN_LIST FEATURES)
|
||||
set(SPDLOG_USE_BENCHMARK ON)
|
||||
endif()
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
benchmark SPDLOG_BUILD_BENCH
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DSPDLOG_FMT_EXTERNAL=ON
|
||||
-DSPDLOG_BUILD_BENCH=${SPDLOG_USE_BENCHMARK}
|
||||
-DSPDLOG_INSTALL=ON
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user