summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorbatsumaru <>2026-08-09 18:11:37 +0900
committerbatsumaru <>2026-08-09 18:11:37 +0900
commit0604aba2bfbd375a361fcc845b5655caa232a880 (patch)
tree29223dba533f64ca9baeb2261e0634ab467b1001 /meson.build
parentcef49d4a396866fb5eef9ffa7a5a54b3bc0cb8af (diff)
Added RapidCheck
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build10
1 files changed, 9 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index bff85ce..9f860b9 100644
--- a/meson.build
+++ b/meson.build
@@ -3,6 +3,14 @@ project('fg-engine', 'cpp',
cpp = meson.get_compiler('cpp')
+cmake = import('cmake')
+
+rc_options = cmake.subproject_options()
+rc_options.add_cmake_defines({'RC_ENABLE_CATCH': 'ON'})
+rapidcheck_proj = cmake.subproject('rapidcheck', options: rc_options)
+rapidcheck_dep = rapidcheck_proj.dependency('rapidcheck')
+rapidcheck_catch_dep = rapidcheck_proj.dependency('rapidcheck_catch')
+
if cpp.get_id() in ['msvc', 'clang-cl']
add_project_arguments('/std:c++latest', language: 'cpp')
else
@@ -25,7 +33,7 @@ catch2_dep = dependency('catch2-with-main')
test_exe = executable('fg-tests',
sources: files('tests/test_fixed_point.cpp'),
- dependencies: [sim_core_dep, catch2_dep],
+ dependencies: [sim_core_dep, catch2_dep, rapidcheck_dep, rapidcheck_catch_dep],
)
test('unit tests', test_exe, args: ['-r', 'automake'])