From 045c1caf53c1fca59c1ffe6f9ea26adf2fe735f1 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Tue, 14 Sep 2021 08:31:55 +0800 Subject: [PATCH] Fix compile error in internal version of Visual Studio (#20127) --- ports/quill/fix-c4189-warning.patch | 15 +++++++++++++++ ports/quill/portfile.cmake | 15 ++++++++------- ports/quill/vcpkg.json | 11 ++++++++++- versions/baseline.json | 2 +- versions/q-/quill.json | 5 +++++ 5 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 ports/quill/fix-c4189-warning.patch diff --git a/ports/quill/fix-c4189-warning.patch b/ports/quill/fix-c4189-warning.patch new file mode 100644 index 0000000000..55ae52fc3e --- /dev/null +++ b/ports/quill/fix-c4189-warning.patch @@ -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}) + diff --git a/ports/quill/portfile.cmake b/ports/quill/portfile.cmake index c0893aa8fa..2902e76edd 100644 --- a/ports/quill/portfile.cmake +++ b/ports/quill/portfile.cmake @@ -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) \ No newline at end of file diff --git a/ports/quill/vcpkg.json b/ports/quill/vcpkg.json index a3441a033a..b180656a73 100644 --- a/ports/quill/vcpkg.json +++ b/ports/quill/vcpkg.json @@ -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 + } ] } diff --git a/versions/baseline.json b/versions/baseline.json index 4fb2581598..b59fd80b36 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5546,7 +5546,7 @@ }, "quill": { "baseline": "1.6.3", - "port-version": 0 + "port-version": 1 }, "quirc": { "baseline": "1.1", diff --git a/versions/q-/quill.json b/versions/q-/quill.json index 027adcae43..d2cbe00bff 100644 --- a/versions/q-/quill.json +++ b/versions/q-/quill.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "53bbd43b741956bcb2d1e74cb34bca27b51b7d11", + "version-semver": "1.6.3", + "port-version": 1 + }, { "git-tree": "e6ee8372d06d69dda719c955d24baa1f61924f86", "version-semver": "1.6.3",