2025-01-19 07:38:58 -05:00
|
|
|
# Test files for dobj
|
|
|
|
|
test_sources = [
|
2025-01-20 07:53:10 -05:00
|
|
|
'MetadataTest.cpp',
|
|
|
|
|
'DObjectTest.cpp',
|
|
|
|
|
'LockableDObjectTest.cpp'
|
2025-01-19 07:38:58 -05:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
foreach test_file : test_sources
|
|
|
|
|
exe_name = test_file.split('.')[0]
|
|
|
|
|
message('Building test: ' + exe_name)
|
|
|
|
|
|
|
|
|
|
# Create an executable target for each test
|
|
|
|
|
test_exe = executable(
|
|
|
|
|
exe_name,
|
|
|
|
|
test_file,
|
2025-03-13 14:12:14 -04:00
|
|
|
dependencies: [gtest_dep, gtest_main],
|
2025-01-19 07:38:58 -05:00
|
|
|
include_directories: include_directories('../../src/dobj/public'),
|
|
|
|
|
link_with: libdobj, # Link the dobj library
|
|
|
|
|
install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Add the executable as a test
|
|
|
|
|
test(exe_name, test_exe)
|
|
|
|
|
endforeach
|