mirror of https://github.com/kiwix/libkiwix.git
Make the gtest dependency optional. (#253)
Make the gtest dependency optional.
This commit is contained in:
commit
a8668db2fe
|
@ -1 +1,2 @@
|
||||||
.idea/
|
.idea/
|
||||||
|
*.swp
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
gtest
|
|
@ -7,8 +7,12 @@ tests = [
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
gtest_dep = dependency('gtest', main:true, fallback: ['gtest', 'gtest_dep'])
|
gtest_dep = dependency('gtest',
|
||||||
|
main:true,
|
||||||
|
fallback: ['gtest', 'gtest_dep'],
|
||||||
|
required:false)
|
||||||
|
|
||||||
|
if gtest_dep.found()
|
||||||
foreach test_name : tests
|
foreach test_name : tests
|
||||||
test_exe = executable(test_name, [test_name+'.cpp'],
|
test_exe = executable(test_name, [test_name+'.cpp'],
|
||||||
link_with : kiwixlib,
|
link_with : kiwixlib,
|
||||||
|
@ -17,3 +21,4 @@ foreach test_name : tests
|
||||||
build_rpath : '$ORIGIN')
|
build_rpath : '$ORIGIN')
|
||||||
test(test_name, test_exe)
|
test(test_name, test_exe)
|
||||||
endforeach
|
endforeach
|
||||||
|
endif
|
||||||
|
|
Loading…
Reference in New Issue