cpu.lua 894 Bytes
Newer Older
PanZezhongQY's avatar
PanZezhongQY committed
1
2
target("infiniop-cpu")
    set_kind("static")
PanZezhong's avatar
PanZezhong committed
3
4
    add_deps("infini-utils")
    on_install(function (target) end)
PanZezhongQY's avatar
PanZezhongQY committed
5

6
    set_warnings("all", "error")
7
    add_cxflags("-Wno-unknown-pragmas")
8

9
10
11
12
13
    if is_plat("windows") then
        if has_config("omp") then
            add_cxflags("/openmp")
        end
    else
PanZezhongQY's avatar
PanZezhongQY committed
14
        add_cxflags("-fPIC")
15
16
17
18
        if has_config("omp") then
            add_cxflags("-fopenmp")
            add_ldflags("-fopenmp")
        end
PanZezhongQY's avatar
PanZezhongQY committed
19
20
21
22
    end

    set_languages("cxx17")
    add_files("../src/infiniop/devices/cpu/*.cc", "../src/infiniop/ops/*/cpu/*.cc")
23

24
target_end()
25
26
27

target("infinirt-cpu")
    set_kind("static")
PanZezhong's avatar
PanZezhong committed
28
29
    add_deps("infini-utils")
    on_install(function (target) end)
30
31
32
33
34
35
36
37
38
39

    set_warnings("all", "error")

    if not is_plat("windows") then
        add_cxflags("-fPIC")
    end

    set_languages("cxx17")
    add_files("../src/infinirt/cpu/*.cc")
target_end()