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: Review comments addressed Created Jan. 29, 2018, 4:56 p.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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 input: core_objects + shared_objects, 185 input: core_objects + shared_objects,
186 output: COMPILER_OUTPUT, 186 output: COMPILER_OUTPUT,
187 depend_files: [ JS_LIBRARY ], 187 depend_files: [ JS_LIBRARY ],
188 command: [ 188 command: [
189 emcc, '-o', output_file, 189 emcc, '-o', output_file,
190 '--post-js', bindings_output, 190 '--post-js', bindings_output,
191 '--js-library', JS_LIBRARY, 191 '--js-library', JS_LIBRARY,
192 '@INPUT@' 192 '@INPUT@'
193 ] + compiler_args + optional_args) 193 ] + compiler_args + optional_args)
194 else 194 else
195 GTEST_DIR = join_paths('third-party', 'googletest', 'googletest')
196 GTEST_PARAMS = []
197 compiler = meson.get_compiler('cpp')
198 if compiler.has_argument('-pthread')
199 GTEST_PARAMS += '-pthread'
200 endif
201
202 test_sources = [
203 'test/compiled/abptest.cpp',
204 'test/compiled/String.cpp',
205 'test/compiled/StringMap.cpp',
206 'test/compiled/RegExp.cpp',
207 ]
208
195 adblockpluscore = library('adblockpluscore', shared_sources, 209 adblockpluscore = library('adblockpluscore', shared_sources,
196 native_sources, 210 native_sources,
197 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS, 211 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS,
198 link_args: LINK_PARAMS) 212 link_args: LINK_PARAMS)
213 gtest = static_library('gtest', files(join_paths(GTEST_DIR, 'src', 'gtest-all. cc')),
214 include_directories: [
215 include_directories(join_paths(GTEST_DIR, 'include' ), is_system: true),
216 include_directories(GTEST_DIR)
217 ],
218 cpp_args: GTEST_PARAMS)
219 abptest = executable('abptest', test_sources,
220 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS,
221 include_directories: include_directories(join_paths(GTEST _DIR, 'include')),
222 link_args: LINK_PARAMS,
223 link_with: [ adblockpluscore, gtest ])
224 test('abptest', abptest)
199 endif 225 endif
200 226
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