Skip to content

Commit

Permalink
Fix compile error in internal version of Visual Studio (#20127)
Browse files Browse the repository at this point in the history
  • Loading branch information
NancyLi1013 authored Sep 14, 2021
1 parent 5bc3538 commit 045c1ca
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 9 deletions.
15 changes: 15 additions & 0 deletions ports/quill/fix-c4189-warning.patch
Original file line number Diff line number Diff line change
@@ -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})

15 changes: 8 additions & 7 deletions ports/quill/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
11 changes: 10 additions & 1 deletion ports/quill/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5546,7 +5546,7 @@
},
"quill": {
"baseline": "1.6.3",
"port-version": 0
"port-version": 1
},
"quirc": {
"baseline": "1.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/q-/quill.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "53bbd43b741956bcb2d1e74cb34bca27b51b7d11",
"version-semver": "1.6.3",
"port-version": 1
},
{
"git-tree": "e6ee8372d06d69dda719c955d24baa1f61924f86",
"version-semver": "1.6.3",
Expand Down

0 comments on commit 045c1ca

Please sign in to comment.