From 005a664f5b3ef7b833ab7b4afdb41583d56b6811 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 19 Feb 2022 22:30:38 +0800 Subject: improve zig cc --- tests/projects/c++/console_zig_cxx/.gitignore | 8 ++++++++ tests/projects/c++/console_zig_cxx/src/main.cpp | 9 +++++++++ tests/projects/c++/console_zig_cxx/xmake.lua | 9 +++++++++ 3 files changed, 26 insertions(+) create mode 100644 tests/projects/c++/console_zig_cxx/.gitignore create mode 100644 tests/projects/c++/console_zig_cxx/src/main.cpp create mode 100644 tests/projects/c++/console_zig_cxx/xmake.lua (limited to 'tests/projects/c++') diff --git a/tests/projects/c++/console_zig_cxx/.gitignore b/tests/projects/c++/console_zig_cxx/.gitignore new file mode 100644 index 000000000..152105761 --- /dev/null +++ b/tests/projects/c++/console_zig_cxx/.gitignore @@ -0,0 +1,8 @@ +# Xmake cache +.xmake/ +build/ + +# MacOS Cache +.DS_Store + + diff --git a/tests/projects/c++/console_zig_cxx/src/main.cpp b/tests/projects/c++/console_zig_cxx/src/main.cpp new file mode 100644 index 000000000..7c435d251 --- /dev/null +++ b/tests/projects/c++/console_zig_cxx/src/main.cpp @@ -0,0 +1,9 @@ +#include + +using namespace std; + +int main(int argc, char** argv) +{ + cout << "hello world!" << endl; + return 0; +} diff --git a/tests/projects/c++/console_zig_cxx/xmake.lua b/tests/projects/c++/console_zig_cxx/xmake.lua new file mode 100644 index 000000000..ef3ebc748 --- /dev/null +++ b/tests/projects/c++/console_zig_cxx/xmake.lua @@ -0,0 +1,9 @@ +add_rules("mode.debug", "mode.release") +add_requires("zig 0.7.x") + +target("test") + set_kind("binary") + add_files("src/*.cpp") + set_toolchains("@zig") + + -- cgit v1.3.1