DNASequence/xmake.lua

29 lines
1.2 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

add_rules("mode.debug","mode.release")
set_languages("c++23")
if is_mode("release")then
set_optimize("aggressive") --这里使用了激进的优化,可能会导致浮点数计算不准确,考虑到本项目没有浮点计算,酌情考虑开启
-- set_optimize("fastest") --上面和下面的二选一,--表示注释
if is_plat("windows")then
-- 注意下面是启用AVX512指令集矢量化加速只有新2010年后的CPU支持但是可以大大加快批量指令加速可以试试将下面的--删除
-- 但是似乎这个程序目前任然是IO密集型性能差不多目前注释掉了
-- add_cxxflags("/arch:AVX512")
elseif is_plat("linux") or is_plat("mingw") or is_plat("clang")then
-- 启用AVX512指令集矢量化加速可能会导致无法在除了编译本程序的电脑上运行出现兼容问题
-- add_cxxflags("-march=native")
end
end
if is_plat("windows")then
add_cxxflags("/openmp")
elseif is_plat("linux") or is_plat("mingw") or is_plat("clang")then
add_cxflags("-fopenmp")
end
add_includedirs("src/tools")
set_rundir("./")
target("dna")
add_files("src/main.cpp")