Skip to content

Commit

Permalink
Enforce meson.build formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacKhor committed Apr 12, 2024
1 parent 2d9b65c commit 5619461
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 14 deletions.
39 changes: 28 additions & 11 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
project('lsvd-rbd', 'cpp',
version: '0.1',
project(
'lsvd-rbd',
'cpp',
version: '0.1',
default_options: [
'cpp_std=c++20',
'cpp_std=c++20',
'warning_level=2',
'b_colorout=always'
])
'b_colorout=always',
],
)

add_project_arguments('-fPIC', language: 'cpp')
add_project_arguments('-Wno-unused-parameter', language: 'cpp')
Expand All @@ -15,16 +18,30 @@ if get_option('buildtype') == 'debug'

# add sanitizers for debug builds
add_project_arguments(
'-fsanitize=address,undefined,nullability,implicit-conversion', language: 'cpp')
'-fsanitize=address,undefined,nullability,implicit-conversion',
language: 'cpp',
)
add_project_link_arguments(
'-fsanitize=address,undefined',
'-Wl,--unresolved-symbols=ignore-in-object-files',
language: 'cpp')
'-fsanitize=address,undefined',
'-Wl,--unresolved-symbols=ignore-in-object-files',
language: 'cpp',
)
endif

subdir('src')
liblsvd = library('lsvd', lsvd_src, dependencies: lsvd_deps, install: false)
executable('imgtool', 'src/imgtool.cc', link_with: liblsvd, dependencies: lsvd_deps)
executable('thick-image', 'src/thick-image.cc', link_with: liblsvd, dependencies: lsvd_deps)

executable(
'imgtool',
'src/imgtool.cc',
link_with: liblsvd,
dependencies: lsvd_deps,
)
executable(
'thick-image',
'src/thick-image.cc',
link_with: liblsvd,
dependencies: lsvd_deps,
)

subdir('test')
25 changes: 22 additions & 3 deletions test/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
seq = executable('test-seq', 'test-seq.cc', include_directories: lsvd_inc, link_with: liblsvd, dependencies: lsvd_deps)
rados = executable('test-rados', 'test-rados.cc', include_directories: lsvd_inc, link_with: liblsvd, dependencies: lsvd_deps)
unit1 = executable('unit-test', 'unit-test.cc', include_directories: lsvd_inc, link_with: liblsvd, dependencies: lsvd_deps)
seq = executable(
'test-seq',
'test-seq.cc',
include_directories: lsvd_inc,
link_with: liblsvd,
dependencies: lsvd_deps,
)
rados = executable(
'test-rados',
'test-rados.cc',
include_directories: lsvd_inc,
link_with: liblsvd,
dependencies: lsvd_deps,
)
unit1 = executable(
'unit-test',
'unit-test.cc',
include_directories: lsvd_inc,
link_with: liblsvd,
dependencies: lsvd_deps,
)

# executable('lsvd_crash_test', 'lsvd_crash_test.cc', include_directories: lsvd_inc, link_with: liblsvd, dependencies: lsvd_deps)
# executable('lsvd_rnd_test', 'lsvd_rnd_test.cc', include_directories: lsvd_inc, link_with: liblsvd, dependencies: lsvd_deps)

Expand Down

0 comments on commit 5619461

Please sign in to comment.