summaryrefslogtreecommitdiff
path: root/tests/projects/c++/modules/multiple_runtimes/xmake.lua
blob: f67ab211b094fc8cd971d0806169fe5b0b44b511 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
add_rules("mode.debug", "mode.release")
set_languages("c++23")
set_encodings("utf-8")

if is_plat("windows") then
    -- on windows, llvm libc++ std module is currently not supported, uncommend when supported
    -- target("llvm")
    --     set_kind("binary")
    --     set_toolchains("clang")
    --     set_runtimes("c++_shared")
    --     set_policy("build.c++.modules", true)
    --     add_files("src/main.cpp")

    target("llvm-msvc")
        set_kind("binary")
        set_toolchains("clang")
        set_policy("build.c++.modules", true)
        add_files("src/main.cpp")

    target("msvc")
        set_kind("binary")
        set_toolchains("msvc")
        set_policy("build.c++.modules", true)
        add_files("src/main.cpp")
else
    target("llvm")
        set_kind("binary")
        set_toolchains("clang")
        set_runtimes("c++_shared")
        set_policy("build.c++.modules", true)
        add_files("src/main.cpp")

    target("gnu")
        set_kind("binary")
        set_toolchains("gcc")
        set_runtimes("stdc++_shared")
        set_policy("build.c++.modules", true)
        set_policy("build.c++.modules.gcc.cxx11abi", true)
        add_files("src/main.cpp")
end