35 lines
1.1 KiB
Lua
35 lines
1.1 KiB
Lua
set_project("bitserial")
|
|
set_version("1.0.0")
|
|
|
|
add_rules("mode.debug", "mode.release", "mode.releasedbg", "mode.minsizerel")
|
|
set_languages("c++20")
|
|
add_cxxflags("/Zc:preprocessor", "/utf-8", {tools = "cl"})
|
|
if is_plat("mingw") then
|
|
add_ldflags("-static", "-static-libgcc", "-static-libstdc++")
|
|
end
|
|
|
|
target("bitserial")
|
|
set_kind("headeronly")
|
|
add_headerfiles("bitserial.hpp", "include/(bitserial/**.hpp)")
|
|
add_includedirs(".", "include", {public = true})
|
|
|
|
target("bitserial_catch2")
|
|
set_kind("static")
|
|
add_files("third_party/catch2/catch_amalgamated.cpp")
|
|
add_includedirs("third_party/catch2", {public = true})
|
|
|
|
target("bitserial_tests")
|
|
set_kind("binary")
|
|
add_files("tests/bitserial_tests.cpp")
|
|
add_deps("bitserial", "bitserial_catch2")
|
|
|
|
target("bitserial_benchmarks")
|
|
set_kind("binary")
|
|
add_files("benchmarks/baq_bulk_benchmarks.cpp")
|
|
add_deps("bitserial", "bitserial_catch2")
|
|
if is_arch("x64", "x86") then
|
|
add_cxxflags("/arch:AVX2", {tools = "cl"})
|
|
add_cxxflags("-O3", "-mavx2", "-mbmi2", {tools = {"gcc", "clang"}})
|
|
end
|
|
add_ldflags("/STACK:33554432", {tools = "link"})
|