From a68896390302565cc281347334ac0cd1f47d25a0 Mon Sep 17 00:00:00 2001 From: bog Date: Sat, 7 Oct 2023 14:11:43 +0200 Subject: [PATCH] :tada: start c++ project. --- .gitignore | 4 ++++ Makefile | 11 +++++++++++ README.md | 22 ++++++++++++++++++++-- meson.build | 37 +++++++++++++++++++++++++++++++++++++ src/main.cpp | 6 ++++++ tests/main.cpp | 2 ++ 6 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 meson.build create mode 100644 src/main.cpp create mode 100644 tests/main.cpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..10a7aa1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*~* +*\#* +build +.cache \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f3cdd85 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +.PHONY: build tests + +build: + meson setup build + meson compile -C build + +tests: build + build/pwq-tests + +install: tests + meson install -C build diff --git a/README.md b/README.md index 56464ce..0fdf838 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,21 @@ -# pywiq +# Pywiq Terminal Code Editor +Pywiq is a text editor specialized in programming and running +exclusively on the terminal. -Pywiq Terminal Code Editor \ No newline at end of file + +## How to install +Installing Pywiq is as easy as using a Makefile. +Behind it, the project uses meson build system. + +```bash +$ sudo make install +``` + +It will build, test and install pywiq. Once installed, you can run +pywiq using the command ``pwq``. + +## How to contribute ? +Don't. + +## License +Pywiq is released under the GPLv3 license. diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..405ef0c --- /dev/null +++ b/meson.build @@ -0,0 +1,37 @@ +project('pywiq', + 'cpp', + version: '0.0.0', + default_options: [ + 'prefix=/usr', + 'warning_level=3', + 'cpp_std=c++17', + ]) + +pwq_lib = static_library('pywiq', + sources: [ + ], + dependencies: [ + ]) + +pwq_dep = declare_dependency( + link_with: pwq_lib, + include_directories: ['src'] +) + +executable('pwq', + sources: [ + 'src/main.cpp', + ], + dependencies: [ + pwq_dep + ], + install: true) + +executable('pwq-tests', + sources: [ + 'tests/main.cpp', + ], + dependencies: [ + pwq_dep, + dependency('catch2') + ]) diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..a72903a --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,6 @@ +#include + +int main(int, char**) +{ + return 0; +} diff --git a/tests/main.cpp b/tests/main.cpp new file mode 100644 index 0000000..4ed06df --- /dev/null +++ b/tests/main.cpp @@ -0,0 +1,2 @@ +#define CATCH_CONFIG_MAIN +#include