summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/example_03_hello_world_toml/hello_world.cc7
-rw-r--r--examples/example_03_hello_world_toml/posix.toml8
-rw-r--r--examples/example_03_hello_world_toml/win64.toml8
3 files changed, 23 insertions, 0 deletions
diff --git a/examples/example_03_hello_world_toml/hello_world.cc b/examples/example_03_hello_world_toml/hello_world.cc
new file mode 100644
index 0000000..ae47ce8
--- /dev/null
+++ b/examples/example_03_hello_world_toml/hello_world.cc
@@ -0,0 +1,7 @@
+#include <iostream>
+#include <string>
+
+int main(int argc, char** argv) {
+ std::cout << "hello, world!\n";
+ return 0;
+}
diff --git a/examples/example_03_hello_world_toml/posix.toml b/examples/example_03_hello_world_toml/posix.toml
new file mode 100644
index 0000000..4f71f7d
--- /dev/null
+++ b/examples/example_03_hello_world_toml/posix.toml
@@ -0,0 +1,8 @@
+compiler_path = "g++"
+compiler_std = "c++20"
+headers_path = [ "lib" ]
+sources_path = [ "hello_world.cc" ]
+output_name = "hello_world.elf"
+compiler_flags = [ "-fPIC" ]
+cpp_macros = [ "FOO_MACRO" ]
+run_after_build = true
diff --git a/examples/example_03_hello_world_toml/win64.toml b/examples/example_03_hello_world_toml/win64.toml
new file mode 100644
index 0000000..c8001a4
--- /dev/null
+++ b/examples/example_03_hello_world_toml/win64.toml
@@ -0,0 +1,8 @@
+compiler_path = "x86_64-w64-mingw32-g++"
+compiler_std = "c++20"
+headers_path = [ "lib" ]
+sources_path = [ "hello_world.cc" ]
+output_name = "hello_world.elf"
+compiler_flags = [ "-fPIC" ]
+cpp_macros = [ "FOO_MACRO" ]
+run_after_build = true