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

Side by Side Diff: meson.build

Issue 29684686: Noissue - fix native tests (Closed) Base URL: github.com:adblockplus/adblockpluscore
Patch Set: Created Jan. 30, 2018, 2:26 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 22 matching lines...) Expand all
33 endif 33 endif
34 nodejs = find_program(command.stdout().strip(), 'node', 'nodejs') 34 nodejs = find_program(command.stdout().strip(), 'node', 'nodejs')
35 endif 35 endif
36 36
37 JS_LIBRARY = files(join_paths('compiled', 'library.js')) 37 JS_LIBRARY = files(join_paths('compiled', 'library.js'))
38 BINDINGS_JS_LIBRARY = files(join_paths('compiled', 'bindings', 'library.js')) 38 BINDINGS_JS_LIBRARY = files(join_paths('compiled', 'bindings', 'library.js'))
39 BINDINGS_GENERATOR = 'bindings.cpp.js' 39 BINDINGS_GENERATOR = 'bindings.cpp.js'
40 BINDINGS_OUTPUT = 'bindings.js' 40 BINDINGS_OUTPUT = 'bindings.js'
41 COMPILER_OUTPUT = 'compiled.js' 41 COMPILER_OUTPUT = 'compiled.js'
42 # params for emcc compilation 42 # params for emcc compilation
43 ADDITIONAL_PARAMS = [ '-O3', '-std=c++1z', '-Wall', '-Werror', 43 ADDITIONAL_PARAMS = [ '-O3', '-std=c++1z', '-Wall', '-Werror',
sergei 2018/01/30 14:29:10 -Werror should be also removed because there are w
hub 2018/01/30 15:13:22 FWIW I have no warnings here. But I agree on remov
sergei 2018/01/30 15:21:52 I really want to have a project without warnings b
44 '-fno-rtti' ] 44 '-fno-rtti' ]
45 if target_type == 'js' 45 if target_type == 'js'
46 # CXXFLAGS specific to emcc 46 # CXXFLAGS specific to emcc
47 ADDITIONAL_PARAMS += [ '-m32', '--memory-init-file', '0', 47 ADDITIONAL_PARAMS += [ '-m32', '--memory-init-file', '0',
48 '--emit-symbol-map' ] 48 '--emit-symbol-map' ]
49 else 49 else
50 ADDITIONAL_PARAMS += [ '-fsanitize=address' ] 50 ADDITIONAL_PARAMS += [ '-fsanitize=address' ]
51 endif 51 endif
52 # additional params just for core 52 # additional params just for core
53 CORE_PARAMS = [ '-fno-exceptions' ] 53 CORE_PARAMS = [ '-fno-exceptions' ]
(...skipping 131 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') 195 GTEST_DIR = join_paths('third_party', 'googletest', 'googletest')
hub 2018/01/30 15:13:22 *sigh* there was a change at one point (when I add
196 GTEST_PARAMS = [] 196 GTEST_PARAMS = []
197 compiler = meson.get_compiler('cpp') 197 compiler = meson.get_compiler('cpp')
198 if compiler.has_argument('-pthread') 198 if compiler.has_argument('-pthread')
199 GTEST_PARAMS += '-pthread' 199 GTEST_PARAMS += '-pthread'
200 LINK_PARAMS += '-lpthread'
200 endif 201 endif
201 202
202 test_sources = [ 203 test_sources = [
203 'test/compiled/abptest.cpp', 204 'test/compiled/abptest.cpp',
204 'test/compiled/String.cpp', 205 'test/compiled/String.cpp',
205 'test/compiled/StringMap.cpp', 206 'test/compiled/StringMap.cpp',
206 'test/compiled/RegExp.cpp', 207 'test/compiled/RegExp.cpp',
207 ] 208 ]
208 209
209 adblockpluscore = library('adblockpluscore', shared_sources, 210 adblockpluscore = library('adblockpluscore', shared_sources,
210 native_sources, 211 native_sources,
211 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS, 212 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS,
212 link_args: LINK_PARAMS) 213 link_args: LINK_PARAMS)
213 gtest = static_library('gtest', files(join_paths(GTEST_DIR, 'src', 'gtest-all. cc')), 214 gtest = static_library('gtest', files(join_paths(GTEST_DIR, 'src', 'gtest-all. cc')),
214 include_directories: [ 215 include_directories: [
215 include_directories(join_paths(GTEST_DIR, 'include' ), is_system: true), 216 include_directories(join_paths(GTEST_DIR, 'include' ), is_system: true),
216 include_directories(GTEST_DIR) 217 include_directories(GTEST_DIR)
217 ], 218 ],
218 cpp_args: GTEST_PARAMS) 219 cpp_args: GTEST_PARAMS)
219 abptest = executable('abptest', test_sources, 220 abptest = executable('abptest', test_sources,
220 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS, 221 cpp_args: ADDITIONAL_PARAMS + CORE_PARAMS,
221 include_directories: include_directories(join_paths(GTEST _DIR, 'include')), 222 include_directories: include_directories(join_paths(GTEST _DIR, 'include')),
222 link_args: LINK_PARAMS, 223 link_args: LINK_PARAMS,
223 link_with: [ adblockpluscore, gtest ]) 224 link_with: [ adblockpluscore, gtest ])
224 test('abptest', abptest) 225 test('abptest', abptest)
225 endif 226 endif
226 227
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld