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.
 
 
 

24 lines
1.0 KiB

package("stringbuilder")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/Isameru/stringbuilder")
set_description("Fast, efficient and convenient alternative to std::stringstream and std::string concatenation.")
set_license("MIT")
add_urls("https://github.com/Isameru/stringbuilder.git")
add_versions("2023.7.10", "ab772a6f0db237155d17a68c8f72b48383137872")
on_install("!windows", function (package)
io.replace("include/stringbuilder.h", "#pragma once", "#pragma once\n#include <ios>\n#include <stdexcept>", {plain = true})
io.replace("include/stringbuilder.h", "#include <intrin.h>", "", {plain = true})
os.cp("include", package:installdir())
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <stringbuilder.h>
void test() {
auto sb = sbldr::stringbuilder<5>{};
sb << "123";
}
]]}, {configs = {languages = "c++17"}}))
end)