Unverified Commit 9daba5b8 authored by PanZezhong1725's avatar PanZezhong1725 Committed by GitHub
Browse files

Merge pull request #124 from PanZezhong1725/issue/123

issue/123 修复昇腾平台编译utils缺少fpic选项问题
parents c0d94151 0e8d81d0
......@@ -120,8 +120,23 @@ target("infini-utils")
set_kind("static")
on_install(function (target) end)
set_languages("cxx17")
set_warnings("all", "error")
if is_plat("windows") then
add_cxflags("/wd4068")
if has_config("omp") then
add_cxflags("/openmp")
end
else
add_cxflags("-fPIC", "-Wno-unknown-pragmas")
if has_config("omp") then
add_cxflags("-fopenmp")
add_ldflags("-fopenmp")
end
end
add_files("src/utils/*.cc")
add_cxflags("-Wno-unknown-pragmas")
target_end()
target("infinirt")
......
......@@ -4,14 +4,14 @@ target("infiniop-cpu")
on_install(function (target) end)
set_warnings("all", "error")
add_cxflags("-Wno-unknown-pragmas")
if is_plat("windows") then
add_cxflags("/wd4068")
if has_config("omp") then
add_cxflags("/openmp")
end
else
add_cxflags("-fPIC")
add_cxflags("-fPIC", "-Wno-unknown-pragmas")
if has_config("omp") then
add_cxflags("-fopenmp")
add_ldflags("-fopenmp")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment