summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorbatsumaru <>2026-08-09 10:54:32 +0900
committerbatsumaru <>2026-08-09 10:54:32 +0900
commit86e6b2a2a35f46550439262978d52bdeb93c6dc6 (patch)
tree06324833942126ca5132ec595d8880c8a8a55eed /meson.build
Initial commit, fixed point addition
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build29
1 files changed, 29 insertions, 0 deletions
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..4aa7ece
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,29 @@
+project('fg-engine', 'cpp',
+ default_options: ['warning_level=3', 'cpp_std=none'])
+
+cpp = meson.get_compiler('cpp')
+
+if cpp.get_id() in ['msvc', 'clang-cl']
+ add_project_arguments('/std:c++latest', language: 'cpp')
+else
+ add_project_arguments('-std=c++23', language: 'cpp')
+endif
+
+sim_core = static_library('sim_core',
+ sources: files('src/fixed_point.cpp'),
+ include_directories: 'include',
+)
+
+sim_core_dep = declare_dependency(
+ link_with: sim_core,
+ include_directories: 'include',
+)
+
+catch2_dep = dependency('catch2-with-main')
+
+test_exe = executable('fg-tests',
+ sources: files('tests/test_fixed_point.cpp'),
+ dependencies: [sim_core_dep, catch2_dep],
+)
+
+test('unit tests', test_exe)