From 004bc5ccdf1a8499e2c937dcc687843cea89160d Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 28 Mar 2025 05:03:12 +0100 Subject: examples: move example files from tests/ to examples/example_01/ Relocate the generic C++ example and its build configs into a dedicated examples/example_01/ directory to better separate tests from usage samples. No content changes were made; files were renamed only. Signed-off-by: Amlal El Mahrouss --- examples/example_01/example.cc | 8 ++++++++ examples/example_01/posix.json | 10 ++++++++++ examples/example_01/win64.json | 10 ++++++++++ tests/example.cc | 8 -------- tests/posix.json | 10 ---------- tests/win64.json | 10 ---------- 6 files changed, 28 insertions(+), 28 deletions(-) create mode 100644 examples/example_01/example.cc create mode 100644 examples/example_01/posix.json create mode 100644 examples/example_01/win64.json delete mode 100644 tests/example.cc delete mode 100644 tests/posix.json delete mode 100644 tests/win64.json diff --git a/examples/example_01/example.cc b/examples/example_01/example.cc new file mode 100644 index 0000000..dfef2e4 --- /dev/null +++ b/examples/example_01/example.cc @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char** argv) +{ + std::cout << "hello, world!\n"; + return 0; +} diff --git a/examples/example_01/posix.json b/examples/example_01/posix.json new file mode 100644 index 0000000..17a6022 --- /dev/null +++ b/examples/example_01/posix.json @@ -0,0 +1,10 @@ +{ + "compiler_path": "g++", + "compiler_std": "c++20", + "headers_path": ["lib"], + "sources_path": ["example.cc"], + "output_name": "example.elf", + "compiler_flags": ["-fPIC"], + "cpp_macros": ["FOO_MACRO"], + "run_after_build": true +} diff --git a/examples/example_01/win64.json b/examples/example_01/win64.json new file mode 100644 index 0000000..1712d8b --- /dev/null +++ b/examples/example_01/win64.json @@ -0,0 +1,10 @@ +{ + "compiler_path": "x86_64-w64-mingw32-g++", + "compiler_std": "c++20", + "headers_path": ["lib"], + "sources_path": ["example.cc"], + "output_name": "example.elf", + "compiler_flags": ["-fPIC"], + "cpp_macros": ["FOO_MACRO"], + "run_after_build": true +} diff --git a/tests/example.cc b/tests/example.cc deleted file mode 100644 index dfef2e4..0000000 --- a/tests/example.cc +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include - -int main(int argc, char** argv) -{ - std::cout << "hello, world!\n"; - return 0; -} diff --git a/tests/posix.json b/tests/posix.json deleted file mode 100644 index 17a6022..0000000 --- a/tests/posix.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "compiler_path": "g++", - "compiler_std": "c++20", - "headers_path": ["lib"], - "sources_path": ["example.cc"], - "output_name": "example.elf", - "compiler_flags": ["-fPIC"], - "cpp_macros": ["FOO_MACRO"], - "run_after_build": true -} diff --git a/tests/win64.json b/tests/win64.json deleted file mode 100644 index 1712d8b..0000000 --- a/tests/win64.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "compiler_path": "x86_64-w64-mingw32-g++", - "compiler_std": "c++20", - "headers_path": ["lib"], - "sources_path": ["example.cc"], - "output_name": "example.elf", - "compiler_flags": ["-fPIC"], - "cpp_macros": ["FOO_MACRO"], - "run_after_build": true -} -- cgit v1.2.3