diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bc5504b --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.cache +build +*~* +*\#* diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9f6a4c1 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +.PHONY: build tests + +build: + meson setup build + meson compile -C build + +tests: build + build/snaketests + +install: tests + meson install -C build + +check: + @cppcheck --language=c++ --enable=all -q \ + --suppress=missingIncludeSystem \ + src lang diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..6036d4a --- /dev/null +++ b/meson.build @@ -0,0 +1,42 @@ +project( + 'snakefile', + 'cpp', + version: '0.0.0', + default_options: [ + 'prefix=/usr', + 'warning_level=3', + 'cpp_std=c++20' + ] +) + +lang = static_library( + 'snakelang', + sources: [ + ] +) + +executable( + 'snake', + sources: [ + 'src/main.cpp', + ], + dependencies: [ + ], + link_with: [ + lang + ], + install: true +) + +executable( + 'snaketests', + sources: [ + 'tests/main.cpp', + ], + dependencies: [ + dependency('catch2') + ], + link_with: [ + lang + ] +) 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