summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-08-11 22:35:25 +0800
committerruki <[email protected]>2020-08-11 22:35:25 +0800
commit3571d12eed5cf39a8fb0ae97da7529551c66a95e (patch)
tree3dd663eae497732aba25a889df6e42c90143e492
parent8d5626509b428f47cfab4e2b5bc26a84a9af620b (diff)
improve templates
-rw-r--r--xmake/templates/c++/shared/project/src/main.cpp (renamed from xmake/templates/c++/shared/project/src/test.cpp)0
-rw-r--r--xmake/templates/c++/shared/project/xmake.lua15
-rw-r--r--xmake/templates/c++/static/project/src/interface.cpp (renamed from xmake/templates/c++/static_library/project/src/interface.cpp)0
-rw-r--r--xmake/templates/c++/static/project/src/interface.h (renamed from xmake/templates/c++/static_library/project/src/interface.h)0
-rw-r--r--xmake/templates/c++/static/project/src/main.cpp (renamed from xmake/templates/c++/static_library/project/src/test.cpp)0
-rw-r--r--xmake/templates/c++/static/project/xmake.lua (renamed from xmake/templates/c++/static_library/project/xmake.lua)15
-rw-r--r--xmake/templates/c++/static/template.lua (renamed from xmake/templates/c++/static_library/template.lua)0
-rw-r--r--xmake/templates/c/shared/project/src/main.c (renamed from xmake/templates/c/shared/project/src/test.c)0
-rw-r--r--xmake/templates/c/shared/project/xmake.lua15
-rw-r--r--xmake/templates/c/static/project/src/main.c (renamed from xmake/templates/c/static/project/src/test.c)0
-rw-r--r--xmake/templates/c/static/project/xmake.lua15
11 files changed, 4 insertions, 56 deletions
diff --git a/xmake/templates/c++/shared/project/src/test.cpp b/xmake/templates/c++/shared/project/src/main.cpp
index 72e03272b..72e03272b 100644
--- a/xmake/templates/c++/shared/project/src/test.cpp
+++ b/xmake/templates/c++/shared/project/src/main.cpp
diff --git a/xmake/templates/c++/shared/project/xmake.lua b/xmake/templates/c++/shared/project/xmake.lua
index b4feb75ed..85a597b5e 100644
--- a/xmake/templates/c++/shared/project/xmake.lua
+++ b/xmake/templates/c++/shared/project/xmake.lua
@@ -1,26 +1,13 @@
--- add modes: debug and release
add_rules("mode.debug", "mode.release")
--- add target
target("${TARGETNAME}")
-
- -- set kind
set_kind("shared")
-
- -- add files
add_files("src/interface.cpp")
--- add target
target("${TARGETNAME}_demo")
-
- -- set kind
set_kind("binary")
-
- -- add deps
add_deps("${TARGETNAME}")
-
- -- add files
- add_files("src/test.cpp")
+ add_files("src/main.cpp")
${FAQ}
diff --git a/xmake/templates/c++/static_library/project/src/interface.cpp b/xmake/templates/c++/static/project/src/interface.cpp
index 598d07560..598d07560 100644
--- a/xmake/templates/c++/static_library/project/src/interface.cpp
+++ b/xmake/templates/c++/static/project/src/interface.cpp
diff --git a/xmake/templates/c++/static_library/project/src/interface.h b/xmake/templates/c++/static/project/src/interface.h
index 4a41e9597..4a41e9597 100644
--- a/xmake/templates/c++/static_library/project/src/interface.h
+++ b/xmake/templates/c++/static/project/src/interface.h
diff --git a/xmake/templates/c++/static_library/project/src/test.cpp b/xmake/templates/c++/static/project/src/main.cpp
index 72e03272b..72e03272b 100644
--- a/xmake/templates/c++/static_library/project/src/test.cpp
+++ b/xmake/templates/c++/static/project/src/main.cpp
diff --git a/xmake/templates/c++/static_library/project/xmake.lua b/xmake/templates/c++/static/project/xmake.lua
index ade7a520d..a2f3b77bf 100644
--- a/xmake/templates/c++/static_library/project/xmake.lua
+++ b/xmake/templates/c++/static/project/xmake.lua
@@ -1,26 +1,13 @@
--- add modes: debug and release
add_rules("mode.debug", "mode.release")
--- add target
target("${TARGETNAME}")
-
- -- set kind
set_kind("static")
-
- -- add files
add_files("src/interface.cpp")
--- add target
target("${TARGETNAME}_demo")
-
- -- set kind
set_kind("binary")
-
- -- add deps
add_deps("${TARGETNAME}")
-
- -- add files
- add_files("src/test.cpp")
+ add_files("src/main.cpp")
${FAQ}
diff --git a/xmake/templates/c++/static_library/template.lua b/xmake/templates/c++/static/template.lua
index abfe91a4b..abfe91a4b 100644
--- a/xmake/templates/c++/static_library/template.lua
+++ b/xmake/templates/c++/static/template.lua
diff --git a/xmake/templates/c/shared/project/src/test.c b/xmake/templates/c/shared/project/src/main.c
index 9505a2f75..9505a2f75 100644
--- a/xmake/templates/c/shared/project/src/test.c
+++ b/xmake/templates/c/shared/project/src/main.c
diff --git a/xmake/templates/c/shared/project/xmake.lua b/xmake/templates/c/shared/project/xmake.lua
index b0f490620..0d3153779 100644
--- a/xmake/templates/c/shared/project/xmake.lua
+++ b/xmake/templates/c/shared/project/xmake.lua
@@ -1,26 +1,13 @@
--- add modes: debug and release
add_rules("mode.debug", "mode.release")
--- add target
target("${TARGETNAME}")
-
- -- set kind
set_kind("shared")
-
- -- add files
add_files("src/interface.c")
--- add target
target("${TARGETNAME}_demo")
-
- -- set kind
set_kind("binary")
-
- -- add deps
add_deps("${TARGETNAME}")
-
- -- add files
- add_files("src/test.c")
+ add_files("src/main.c")
${FAQ}
diff --git a/xmake/templates/c/static/project/src/test.c b/xmake/templates/c/static/project/src/main.c
index 9505a2f75..9505a2f75 100644
--- a/xmake/templates/c/static/project/src/test.c
+++ b/xmake/templates/c/static/project/src/main.c
diff --git a/xmake/templates/c/static/project/xmake.lua b/xmake/templates/c/static/project/xmake.lua
index 632776b96..5281023ec 100644
--- a/xmake/templates/c/static/project/xmake.lua
+++ b/xmake/templates/c/static/project/xmake.lua
@@ -1,25 +1,12 @@
--- add modes: debug and release
add_rules("mode.debug", "mode.release")
--- add target
target("${TARGETNAME}")
-
- -- set kind
set_kind("static")
-
- -- add files
add_files("src/interface.c")
--- add target
target("${TARGETNAME}_demo")
-
- -- set kind
set_kind("binary")
-
- -- add deps
add_deps("${TARGETNAME}")
-
- -- add files
- add_files("src/test.c")
+ add_files("src/main.c")
${FAQ}