From 5619461ef5a7cf6cd181e979c9bad9e54233b15c Mon Sep 17 00:00:00 2001 From: Isaac Khor Date: Fri, 12 Apr 2024 19:02:13 -0400 Subject: [PATCH] Enforce meson.build formatting --- meson.build | 39 ++++++++++++++++++++++++++++----------- test/meson.build | 25 ++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 14 deletions(-) diff --git a/meson.build b/meson.build index 69d66314..887a6692 100644 --- a/meson.build +++ b/meson.build @@ -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') @@ -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') diff --git a/test/meson.build b/test/meson.build index f6c10877..5713f15a 100644 --- a/test/meson.build +++ b/test/meson.build @@ -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)