mirror of
https://github.com/likle/cwalk.git
synced 2026-10-28 09:44:01 +00:00
integrates cwalktest with meson build system
* adds `ENABLE_TESTS` option to meson project * adds conditional compilation of `cwalktest` executable * registers `cwalktest` test with meson project
This commit is contained in:
1 parent
44a201c772
commit
6d2ba296a4
3 files changed
+28
No files matched your search
@@ -14,3 +14,7 @@ cwalk = library('cwalk', 'src/cwalk.c',
|
||||
install_headers('include/cwalk.h')
|
||||
|
||||
cwalk_dep = declare_dependency(include_directories: 'include', link_with: cwalk)
|
||||
|
||||
if get_option('ENABLE_TESTS')
|
||||
subdir('test')
|
||||
endif
|
||||
@@ -0,0 +1 @@
|
||||
option('ENABLE_TESTS', type: 'boolean', value: false, description: 'Enables building test executables')
|
||||
@@ -0,0 +1,23 @@
|
||||
cwalktest_sources = files(
|
||||
'main.c',
|
||||
'absolute_test.c',
|
||||
'basename_test.c',
|
||||
'dirname_test.c',
|
||||
'extension_test.c',
|
||||
'guess_test.c',
|
||||
'intersection_test.c',
|
||||
'is_absolute_test.c',
|
||||
'is_relative_test.c',
|
||||
'join_test.c',
|
||||
'normalize_test.c',
|
||||
'relative_test.c',
|
||||
'root_test.c',
|
||||
'segment_test.c',
|
||||
'windows_test.c',
|
||||
)
|
||||
|
||||
cwalktest = executable('cwalktest',
|
||||
sources: cwalktest_sources,
|
||||
dependencies: cwalk_dep,
|
||||
)
|
||||
test('cwalktest', cwalktest)
|
||||
Reference in new issue
Block a user