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

Side by Side Diff: meson.build

Issue 29680720: Issue 6221 - Add native tests. (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Changes from review. Created Jan. 27, 2018, 3:33 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 project('adblockpluscore', 'cpp', license: ['GPL3'], meson_version: '>0.40.0') 1 project('adblockpluscore', 'cpp', license: ['GPL3'], meson_version: '>0.40.0')
2 2
3 native = get_option('native') 3 native = get_option('native')
4 if native 4 if native
5 target_type='native' 5 target_type='native'
6 else 6 else
7 target_type='js' 7 target_type='js'
8 endif 8 endif
9 9
10 if target_type == 'js' 10 if target_type == 'js'
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 input: core_objects + shared_objects, 189 input: core_objects + shared_objects,
190 output: COMPILER_OUTPUT, 190 output: COMPILER_OUTPUT,
191 depend_files: [ JS_LIBRARY ], 191 depend_files: [ JS_LIBRARY ],
192 command: [ 192 command: [
193 emcc, '-o', output_file, 193 emcc, '-o', output_file,
194 '--post-js', bindings_output, 194 '--post-js', bindings_output,
195 '--js-library', JS_LIBRARY, 195 '--js-library', JS_LIBRARY,
196 '@INPUT@' 196 '@INPUT@'
197 ] + compiler_args + optional_args) 197 ] + compiler_args + optional_args)
198 else 198 else
199 GTEST_DIR = join_paths('third-party', 'googletest', 'googletest')
200 GTEST_PARAMS = []
201 compiler = meson.get_compiler('cpp')
202 if compiler.has_argument('-pthread')
203 GTEST_PARAMS += '-pthread'
204 endif
205
206 test_sources = [
207 'test/compiled/abptest.cpp',
208 'test/compiled/String.cpp',
209 'test/compiled/StringMap.cpp',
210 'test/compiled/RegExp.cpp',
211 ]
212
199 adblockpluscore = library('adblockpluscore', shared_sources, 213 adblockpluscore = library('adblockpluscore', shared_sources,
200 native_sources, 214 native_sources,
201 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS, 215 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS,
202 link_args: LINK_PARAMS) 216 link_args: LINK_PARAMS)
217 gtest = static_library('gtest', files(join_paths(GTEST_DIR, 'src', 'gtest-all. cc')),
218 include_directories: [
219 include_directories(join_paths(GTEST_DIR, 'include' ), is_system: true),
220 include_directories(GTEST_DIR)
221 ],
222 cpp_args: GTEST_PARAMS)
223 abptest = executable('abptest', test_sources,
224 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS,
225 include_directories: include_directories(join_paths(GTEST _DIR, 'include')),
226 link_args: LINK_PARAMS,
227 link_with: [ adblockpluscore, gtest ])
228 test('abptest', abptest)
203 endif 229 endif
204 230
OLDNEW
« no previous file with comments | « dependencies ('k') | test/compiled/RegExp.cpp » ('j') | test/compiled/RegExp.cpp » ('J')

Powered by Google App Engine
This is Rietveld