Skip to content

Commit

Permalink
Add easy_profiler
Browse files Browse the repository at this point in the history
  • Loading branch information
jsjtxietian committed Jan 6, 2025
1 parent 72d7580 commit 9cbb7b5
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions packages/e/easy_profiler/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package("easy_profiler")
set_homepage("https://github.com/yse/easy_profiler")
set_description("Lightweight profiler library for c++")
set_license("MIT")

add_urls("https://github.com/yse/easy_profiler/archive/refs/tags/$(version).tar.gz",
"https://github.com/yse/easy_profiler.git")

add_versions("v2.1.0", "fabf95d59ede9da4873aebd52ef8a762fa8578dcdbcc6d7cdd811b5a7c3367ad")

add_deps("cmake")

on_install(function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end)

on_test(function (package)
assert(package:check_cxxsnippets({test = [[
static void test() {
EASY_FUNCTION();
}
]]}, {configs = {languages = "c++17"}, includes = {"easy/profiler.h"}}))
end)

0 comments on commit 9cbb7b5

Please sign in to comment.