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"}}))