From c03e5cbe1eac7d6c8eed4c96dc29f7c4a561d831 Mon Sep 17 00:00:00 2001 From: jj683 <87266000+jj683@users.noreply.github.com> Date: Sat, 16 Nov 2024 14:42:23 +0100 Subject: [PATCH] Proper cmake version for pcapplusplus (#5764) * Proper cmake version for pcapplusplus * Update xmake.lua --------- Co-authored-by: ruki --- packages/p/pcapplusplus/xmake.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/p/pcapplusplus/xmake.lua b/packages/p/pcapplusplus/xmake.lua index 22be10e27..2afada38a 100644 --- a/packages/p/pcapplusplus/xmake.lua +++ b/packages/p/pcapplusplus/xmake.lua @@ -34,10 +34,12 @@ package("pcapplusplus") on_install("windows", "mingw", "linux", "macosx", "android", "bsd", function (package) local configs = { "-DPCAPPP_BUILD_EXAMPLES=OFF", - "-DPCAPPP_BUILD_TESTS=OFF", - "--compile-no-warning-as-error", + "-DPCAPPP_BUILD_TESTS=OFF" } table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) + for _, cmakefile in ipairs(os.files("**/CMakeLists.txt")) do + io.replace(cmakefile, "COMPILE_WARNING_AS_ERROR ON", "COMPILE_WARNING_AS_ERROR OFF") + end import("package.tools.cmake").install(package, configs) end) @@ -54,7 +56,7 @@ package("pcapplusplus") } void testPcapLiveDeviceList() { - std::vector devList = + std::vector devList = pcpp::PcapLiveDeviceList::getInstance().getPcapLiveDevicesList(); } ]]}, {configs = {languages = "c++17"}}))