cpu.lua 854 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

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

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

23
target_end()
24
25
26

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

    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()