summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
authorruki <[email protected]>2023-02-03 23:11:49 +0800
committerGitHub <[email protected]>2023-02-03 23:11:49 +0800
commitccb0ede6e755b0f736a7dd1f6b00b871df5221d0 (patch)
tree0c727f2bae1693b9a240d4f7f584f62abab36120 /xmake
parentb51bae040adafebac74eca5a640e21e2fe2c5478 (diff)
parent419db506cc13289febf5143577b43be672d3db3d (diff)
Merge pull request #3330 from xmake-io/module
improve module without cpp
Diffstat (limited to 'xmake')
-rw-r--r--xmake/languages/c++/xmake.lua2
-rw-r--r--xmake/rules/c++/modules/xmake.lua3
2 files changed, 4 insertions, 1 deletions
diff --git a/xmake/languages/c++/xmake.lua b/xmake/languages/c++/xmake.lua
index e28bb2733..4109ab50b 100644
--- a/xmake/languages/c++/xmake.lua
+++ b/xmake/languages/c++/xmake.lua
@@ -20,7 +20,7 @@
language("c++")
add_rules("c++")
- set_sourcekinds {cc = ".c", cxx = {".cpp", ".cc", ".cxx"}}
+ set_sourcekinds {cc = ".c", cxx = {".cpp", ".cc", ".cxx", ".mpp", ".mxx", ".cppm", ".ixx"}}
set_sourceflags {cc = {"cflags", "cxflags"}, cxx = {"cxxflags", "cxflags"}}
set_targetkinds {binary = "ld", static = "ar", shared = "sh"}
set_targetflags {binary = "ldflags", static = "arflags", shared = "shflags"}
diff --git a/xmake/rules/c++/modules/xmake.lua b/xmake/rules/c++/modules/xmake.lua
index b62ec0f36..2f9b207bf 100644
--- a/xmake/rules/c++/modules/xmake.lua
+++ b/xmake/rules/c++/modules/xmake.lua
@@ -20,7 +20,10 @@
-- define rule: c++.build.modules
rule("c++.build.modules")
+
+ -- @note common.contains_modules() need it
set_extensions(".mpp", ".mxx", ".cppm", ".ixx")
+
add_deps("c++.build.modules.builder")
add_deps("c++.build.modules.install")