mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 11:07:10 +01:00
[spdlog]Add feature[benchmark] (#6924)
* [spdlog]Add feature[benchmark]
This commit is contained in:
parent
e4acc60b3c
commit
49d1759ec8
@ -1,5 +1,9 @@
|
|||||||
Source: spdlog
|
Source: spdlog
|
||||||
Version: 1.3.1
|
Version: 1.3.1-1
|
||||||
Homepage: https://github.com/gabime/spdlog
|
Homepage: https://github.com/gabime/spdlog
|
||||||
Description: Very fast, header only, C++ logging library
|
Description: Very fast, header only, C++ logging library
|
||||||
Build-Depends: fmt
|
Build-Depends: fmt
|
||||||
|
|
||||||
|
Feature: benchmark
|
||||||
|
Description: Use google benchmark
|
||||||
|
Build-Depends: benchmark
|
14
ports/spdlog/fix-feature-export.patch
Normal file
14
ports/spdlog/fix-feature-export.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/bench/CMakeLists.txt b/bench/CMakeLists.txt
|
||||||
|
index 3c4a3f9..3bc3813 100644
|
||||||
|
--- a/bench/CMakeLists.txt
|
||||||
|
+++ b/bench/CMakeLists.txt
|
||||||
|
@@ -46,3 +46,8 @@ add_executable(formatter-bench formatter-bench.cpp)
|
||||||
|
target_link_libraries(formatter-bench PRIVATE benchmark::benchmark spdlog::spdlog Threads::Threads)
|
||||||
|
|
||||||
|
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,5 +1,6 @@
|
|||||||
#header-only library
|
#header-only library
|
||||||
include(vcpkg_common_functions)
|
include(vcpkg_common_functions)
|
||||||
|
|
||||||
vcpkg_from_github(
|
vcpkg_from_github(
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
REPO gabime/spdlog
|
REPO gabime/spdlog
|
||||||
@ -8,19 +9,28 @@ vcpkg_from_github(
|
|||||||
HEAD_REF v1.x
|
HEAD_REF v1.x
|
||||||
PATCHES
|
PATCHES
|
||||||
disable-master-project-check.patch
|
disable-master-project-check.patch
|
||||||
|
fix-feature-export.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(SPDLOG_USE_BENCHMARK OFF)
|
||||||
|
if("benchmark" IN_LIST FEATURES)
|
||||||
|
set(SPDLOG_USE_BENCHMARK ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
PREFER_NINJA
|
PREFER_NINJA
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-DSPDLOG_FMT_EXTERNAL=ON
|
-DSPDLOG_FMT_EXTERNAL=ON
|
||||||
|
-DSPDLOG_BUILD_BENCH=${SPDLOG_USE_BENCHMARK}
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_install_cmake()
|
vcpkg_install_cmake()
|
||||||
|
|
||||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/spdlog)
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/spdlog)
|
||||||
|
|
||||||
|
vcpkg_copy_pdbs()
|
||||||
|
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user