Commit 0e8d81d0 authored by PanZezhong's avatar PanZezhong
Browse files

issue/123 修复昇腾平台编译utils缺少fpic选项问题

parent c0d94151
...@@ -120,8 +120,23 @@ target("infini-utils") ...@@ -120,8 +120,23 @@ target("infini-utils")
set_kind("static") set_kind("static")
on_install(function (target) end) on_install(function (target) end)
set_languages("cxx17") 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_files("src/utils/*.cc")
add_cxflags("-Wno-unknown-pragmas")
target_end() target_end()
target("infinirt") target("infinirt")
......
...@@ -4,14 +4,14 @@ target("infiniop-cpu") ...@@ -4,14 +4,14 @@ target("infiniop-cpu")
on_install(function (target) end) on_install(function (target) end)
set_warnings("all", "error") set_warnings("all", "error")
add_cxflags("-Wno-unknown-pragmas")
if is_plat("windows") then if is_plat("windows") then
add_cxflags("/wd4068")
if has_config("omp") then if has_config("omp") then
add_cxflags("/openmp") add_cxflags("/openmp")
end end
else else
add_cxflags("-fPIC") add_cxflags("-fPIC", "-Wno-unknown-pragmas")
if has_config("omp") then if has_config("omp") then
add_cxflags("-fopenmp") add_cxflags("-fopenmp")
add_ldflags("-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