瀏覽代碼

Auto-update cppcheck to 2.14.0 (#4026)

* Update cppcheck to 2.14.0

* Update xmake.lua

---------

Co-authored-by: star9029 <[email protected]>
ruki 1 年之前
父節點
當前提交
b55b0fa345
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      packages/c/cppcheck/xmake.lua

+ 7 - 1
packages/c/cppcheck/xmake.lua

@@ -10,7 +10,13 @@ package("cppcheck")
     add_deps("cmake")
 
     on_install("windows|x64", "macosx", "linux", "msys", function (package)
-        import("package.tools.cmake").install(package)
+        local configs = {}
+        if package:is_plat("windows") then
+            table.insert(configs, "-DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=''")
+        end
+
+        io.replace("cmake/compileroptions.cmake", "add_compile_options($<$<NOT:$<CONFIG:Debug>>:/MD>)", "", {plain = true})
+        import("package.tools.cmake").install(package, configs)
     end)
 
     on_test(function (package)