package An official xmake package repository
https://xrepo.xmake.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.6 KiB
37 lines
1.6 KiB
package("ittapi") |
|
set_homepage("https://github.com/intel/ittapi") |
|
set_description("Intel® Instrumentation and Tracing Technology (ITT) and Just-In-Time (JIT) API") |
|
set_license("BSD-3-Clause") |
|
|
|
add_urls("https://github.com/intel/ittapi/archive/refs/tags/$(version).tar.gz", |
|
"https://github.com/intel/ittapi.git") |
|
|
|
add_versions("v3.24.4", "f7341c563f228f4358b645fce526208c742fe13e61fc3ba2c777ba94d36e98f5") |
|
|
|
add_configs("force_32", {description = "Force a 32bit compile on 64bit", default = false, type = "boolean"}) |
|
add_configs("ipt", {description = "ptmarks support", default = false, type = "boolean"}) |
|
add_configs("shared", {description = "Build shared binaries.", default = false, type = "boolean", readonly = true}) |
|
|
|
if is_plat("linux") then |
|
add_syslinks("dl") |
|
end |
|
|
|
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")) |
|
table.insert(configs, "-DFORCE_32=" .. (package:config("force_32") and "ON" or "OFF")) |
|
table.insert(configs, "-DITT_API_IPT_SUPPORT=" .. (package:config("ipt") and "ON" or "OFF")) |
|
import("package.tools.cmake").install(package, configs) |
|
end) |
|
|
|
on_test(function (package) |
|
assert(package:check_cxxsnippets({test = [[ |
|
#include <ittnotify.h> |
|
void test() { |
|
__itt_string_handle* nameHandle = __itt_string_handle_create(""); |
|
} |
|
]]})) |
|
end)
|
|
|