Fix compile error in internal version of Visual Studio (#20127)

This commit is contained in:
NancyLi1013 2021-09-14 08:31:55 +08:00 committed by GitHub
parent 5bc3538d65
commit 045c1caf53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 9 deletions

View File

@ -0,0 +1,15 @@
diff --git a/quill/CMakeLists.txt b/quill/CMakeLists.txt
index 76872c2..c173804 100644
--- a/quill/CMakeLists.txt
+++ b/quill/CMakeLists.txt
@@ -148,6 +148,10 @@ if (QUILL_NO_EXCEPTIONS)
endif ()
endif ()
+if (MSVC)
+ add_definitions(/wd4189)
+endif()
+
# Add target sources
target_sources(${TARGET_NAME} PRIVATE ${SOURCE_FILES} ${HEADER_FILES})

View File

@ -8,19 +8,20 @@ vcpkg_from_github(
REF v1.6.3
SHA512 e75aca827fe0833422da0d38df482cbc39db0e43dcc3cb791f3e2649f7022dcc448831a5ede85daf6feada60a2d5eaf312a3411abbba92fb9d76466336a7244d
HEAD_REF master
PATCHES
fix-c4189-warning.patch
)
vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DQUILL_FMT_EXTERNAL=ON
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/quill)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/quill)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/quill/TweakMe.h "// #define QUILL_FMT_EXTERNAL" "#define QUILL_FMT_EXTERNAL")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/quill/TweakMe.h" "// #define QUILL_FMT_EXTERNAL" "#define QUILL_FMT_EXTERNAL")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,10 +1,19 @@
{
"name": "quill",
"version-semver": "1.6.3",
"port-version": 1,
"description": "C++14 Asynchronous Low Latency Logging Library",
"homepage": "https://github.com/odygrd/quill/",
"supports": "!(uwp | android)",
"dependencies": [
"fmt"
"fmt",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -5546,7 +5546,7 @@
},
"quill": {
"baseline": "1.6.3",
"port-version": 0
"port-version": 1
},
"quirc": {
"baseline": "1.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "53bbd43b741956bcb2d1e74cb34bca27b51b7d11",
"version-semver": "1.6.3",
"port-version": 1
},
{
"git-tree": "e6ee8372d06d69dda719c955d24baa1f61924f86",
"version-semver": "1.6.3",