summaryrefslogtreecommitdiff
path: root/meson.build
blob: 4aa7ecefaea85467c4d383be18d708f230e4ae9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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)