blob: 4f77a5610a213065cb4816d0095c41972391d4d4 [file] [log] [blame]
gtest = dependency('gtest', main: true, disabler: true, required: false)
gmock = dependency('gmock', disabler: true, required: false)
if not gtest.found() or not gmock.found()
gtest_proj = import('cmake').subproject('googletest', required: false)
if gtest_proj.found()
gtest = declare_dependency(
dependencies: [
dependency('threads'),
gtest_proj.dependency('gtest'),
gtest_proj.dependency('gtest_main'),
])
gmock = gtest_proj.dependency('gmock')
else
assert(not build_tests.enabled(), 'Googletest is required')
endif
endif
tests = [
'signal',
'handle/copyable',
'handle/managed',
'util/cexec',
'util/string',
]
foreach t : tests
test(t, executable(t.underscorify(), t + '.cpp',
implicit_include_directories: false,
dependencies: [stdplus, gtest, gmock]))
endforeach