🎉 c++ meson project.
parent
e0f0b3b311
commit
9475388e20
|
@ -0,0 +1,4 @@
|
|||
.cache
|
||||
build
|
||||
*~*
|
||||
*\#*
|
|
@ -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
|
|
@ -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
|
||||
]
|
||||
)
|
|
@ -0,0 +1,6 @@
|
|||
#include <iostream>
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
#define CATCH_CONFIG_MAIN
|
||||
#include <catch2/catch.hpp>
|
Reference in New Issue