diff options
| author | ruki <[email protected]> | 2020-01-23 22:49:14 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-01-23 10:55:24 +0800 |
| commit | d989ec1a9903dde07d08bf58386a45dd53651f6c (patch) | |
| tree | 25dc68e9e4641a53c812d7858a0141f5646cb160 /xmake/rules | |
| parent | 17d5e2d5fd3f1d10c0598068cfd58412f848243e (diff) | |
support to compile *.c as c++
Diffstat (limited to 'xmake/rules')
| -rw-r--r-- | xmake/rules/asm/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/c++/xmake.lua | 4 | ||||
| -rw-r--r-- | xmake/rules/cuda/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/dlang/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/go/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/objc++/xmake.lua | 4 | ||||
| -rw-r--r-- | xmake/rules/rust/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/swift/xmake.lua | 2 |
8 files changed, 10 insertions, 10 deletions
diff --git a/xmake/rules/asm/xmake.lua b/xmake/rules/asm/xmake.lua index 5cf9c5a63..0c80b2ee5 100644 --- a/xmake/rules/asm/xmake.lua +++ b/xmake/rules/asm/xmake.lua @@ -20,7 +20,7 @@ -- define rule: asm.build rule("asm.build") - set_extensions(".s", ".asm") + set_sourcekinds("as") on_build_files("private.action.build.object") -- define rule: asm diff --git a/xmake/rules/c++/xmake.lua b/xmake/rules/c++/xmake.lua index bb39ee2de..9211db820 100644 --- a/xmake/rules/c++/xmake.lua +++ b/xmake/rules/c++/xmake.lua @@ -26,7 +26,7 @@ rule("c.build.pcheader") -- define rule: c.build rule("c.build") - set_extensions(".c") + set_sourcekinds("cc") add_deps("c.build.pcheader") on_build_files("private.action.build.object") @@ -38,7 +38,7 @@ rule("c++.build.pcheader") -- define rule: c++.build rule("c++.build") - set_extensions(".cpp", ".cc", ".cxx") + set_sourcekinds("cxx") add_deps("c++.build.pcheader", "c++.build.modules") on_build_files("private.action.build.object") diff --git a/xmake/rules/cuda/xmake.lua b/xmake/rules/cuda/xmake.lua index 739f320ae..220299e55 100644 --- a/xmake/rules/cuda/xmake.lua +++ b/xmake/rules/cuda/xmake.lua @@ -20,7 +20,7 @@ -- define rule: cuda.build rule("cuda.build") - set_extensions(".cu") + set_sourcekinds("cu") add_deps("cuda.build.devlink") on_build_files(function (target, sourcebatch, opt) import("private.action.build.object")(target, sourcebatch, opt) diff --git a/xmake/rules/dlang/xmake.lua b/xmake/rules/dlang/xmake.lua index 62ef87442..4e5a957f7 100644 --- a/xmake/rules/dlang/xmake.lua +++ b/xmake/rules/dlang/xmake.lua @@ -20,7 +20,7 @@ -- define rule: dlang.build rule("dlang.build") - set_extensions(".d") + set_sourcekinds("dc") on_build_files("private.action.build.object") -- define rule: dlang diff --git a/xmake/rules/go/xmake.lua b/xmake/rules/go/xmake.lua index eb9541b78..b7610b0f6 100644 --- a/xmake/rules/go/xmake.lua +++ b/xmake/rules/go/xmake.lua @@ -20,7 +20,7 @@ -- define rule: go.build rule("go.build") - set_extensions(".go") + set_sourcekinds("gc") on_build_files("build.object") -- define rule: cpp diff --git a/xmake/rules/objc++/xmake.lua b/xmake/rules/objc++/xmake.lua index 55306a934..5235aeff8 100644 --- a/xmake/rules/objc++/xmake.lua +++ b/xmake/rules/objc++/xmake.lua @@ -20,13 +20,13 @@ -- define rule: objc.build rule("objc.build") - set_extensions(".m") + set_sourcekinds("mm") add_deps("c.build.pcheader") on_build_files("private.action.build.object") -- define rule: objc++.build rule("objc++.build") - set_extensions(".mm") + set_sourcekinds("mxx") add_deps("c++.build.pcheader") on_build_files("private.action.build.object") diff --git a/xmake/rules/rust/xmake.lua b/xmake/rules/rust/xmake.lua index b0daa2cbe..fc2e0c002 100644 --- a/xmake/rules/rust/xmake.lua +++ b/xmake/rules/rust/xmake.lua @@ -20,7 +20,7 @@ -- define rule: rust.build rule("rust.build") - set_extensions(".rs") + set_sourcekinds("rc") on_build("build.target") -- define rule: cpp diff --git a/xmake/rules/swift/xmake.lua b/xmake/rules/swift/xmake.lua index ca8ed798d..8207262a4 100644 --- a/xmake/rules/swift/xmake.lua +++ b/xmake/rules/swift/xmake.lua @@ -20,7 +20,7 @@ -- define rule: swift.build rule("swift.build") - set_extensions(".swift") + set_sourcekinds("sc") on_build_files("private.action.build.object") -- define rule: swift |
