summaryrefslogtreecommitdiff
path: root/tests/projects/console_c++
diff options
context:
space:
mode:
authorruki <[email protected]>2017-05-19 21:30:30 +0800
committerruki <[email protected]>2017-05-19 21:32:13 +0800
commit03b7d8b955d11895cc15332360eca7b14d6cf58f (patch)
tree4aa9b47aa3f1957a0a4343e7b1c4a8357e7018d5 /tests/projects/console_c++
parent58e3bad5859530c8316de4b4b7939169cdd2c492 (diff)
add projects and modules in tests
Diffstat (limited to 'tests/projects/console_c++')
-rwxr-xr-xtests/projects/console_c++/src/main.cpp9
-rwxr-xr-xtests/projects/console_c++/xmake.lua32
2 files changed, 41 insertions, 0 deletions
diff --git a/tests/projects/console_c++/src/main.cpp b/tests/projects/console_c++/src/main.cpp
new file mode 100755
index 000000000..db2361659
--- /dev/null
+++ b/tests/projects/console_c++/src/main.cpp
@@ -0,0 +1,9 @@
+#include <iostream>
+
+using namespace std;
+
+int main(int argc, char** argv)
+{
+ cout << "hello world!" << endl;
+ return 0;
+}
diff --git a/tests/projects/console_c++/xmake.lua b/tests/projects/console_c++/xmake.lua
new file mode 100755
index 000000000..7f2076db5
--- /dev/null
+++ b/tests/projects/console_c++/xmake.lua
@@ -0,0 +1,32 @@
+-- the debug mode
+if is_mode("debug") then
+
+ -- enable the debug symbols
+ set_symbols("debug")
+
+ -- disable optimization
+ set_optimize("none")
+end
+
+-- the release mode
+if is_mode("release") then
+
+ -- set the symbols visibility: hidden
+ set_symbols("hidden")
+
+ -- enable fastest optimization
+ set_optimize("fastest")
+
+ -- strip all symbols
+ set_strip("all")
+end
+
+-- add target
+target("console_c++")
+
+ -- set kind
+ set_kind("binary")
+
+ -- add files
+ add_files("src/*.cpp")
+