Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: meson.build

Issue 29680720: Issue 6221 - Add native tests. (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Jan. 26, 2018, 8:49 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: meson.build
===================================================================
--- a/meson.build
+++ b/meson.build
@@ -191,14 +191,33 @@
depend_files: [ JS_LIBRARY ],
command: [
emcc, '-o', output_file,
'--post-js', bindings_output,
'--js-library', JS_LIBRARY,
'@INPUT@'
] + compiler_args + optional_args)
else
+ GTEST_DIR = join_paths(meson.source_root(), 'third-party', 'googletest', 'googletest')
+
+ test_sources = [
+ 'test/compiled/abptest.cpp',
+ 'test/compiled/String.cpp',
+ 'test/compiled/StringMap.cpp',
+ ]
+
adblockpluscore = library('adblockpluscore', shared_sources,
native_sources,
cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS,
link_args: LINK_PARAMS)
+ gtest = static_library('gtest', files(join_paths(GTEST_DIR, 'src', 'gtest-all.cc')),
+ cpp_args: [ '-isystem', join_paths(GTEST_DIR, 'include'),
sergei 2018/01/26 22:13:36 I'm afraid isystem is not supported on windows, bu
hub 2018/01/27 03:33:37 I have reworked this part. I use the meson syntax
+ '-I' + GTEST_DIR, '-pthread' ])
+ abptest = executable('abptest', test_sources,
+ cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS +
+ [
+ '-I' + join_paths(GTEST_DIR, 'include'),
+ ],
+ link_args: LINK_PARAMS,
+ link_with: [ adblockpluscore, gtest ])
+ test('abptest', abptest)
endif
« no previous file with comments | « dependencies ('k') | test/compiled/String.cpp » ('j') | test/compiled/String.cpp » ('J')

Powered by Google App Engine
This is Rietveld