New package: cunit (#6133)
* init * fix sha * check msys * fixup * fixup * fixup * fixuppull/6138/head
parent
3fa02e89c0
commit
2c33ed26af
1 changed files with 25 additions and 0 deletions
@ -0,0 +1,25 @@ |
||||
package("cunit") |
||||
set_homepage("https://gitlab.com/cunity/cunit") |
||||
set_description("CUnit is a lightweight system for writing, administering, and running unit tests in C.") |
||||
|
||||
set_license("LGPL-2.1") |
||||
|
||||
add_urls("https://gitlab.com/cunity/cunit/-/archive/$(version)/cunit-$(version).tar.bz2", |
||||
"https://gitlab.com/cunity/cunit.git") |
||||
add_versions("3.4.4", "eda4c24afcb2f689b150dadea790a12efb1a0e5e2eb68df7d6417a3ae70a90c7") |
||||
|
||||
add_deps("cmake") |
||||
|
||||
on_install(function (package) |
||||
io.replace("CMakeLists.txt", "-Werror -Werror=strict-prototypes", "", {plain = true}) |
||||
io.replace("CUnit/CMakeLists.txt", "-Werror -Werror=strict-prototypes", "", {plain = true}) |
||||
local configs = {} |
||||
table.insert(configs, "-DCUNIT_DISABLE_TESTS=TRUE") |
||||
table.insert(configs, "-DCUNIT_DISABLE_EXAMPLES=TRUE") |
||||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("CU_basic_set_mode", {includes = "CUnit/Basic.h"})) |
||||
end) |
Loading…
Reference in new issue