forked from OctaForge/libostd
meson: do not set global cxxflags
this is so that libostd can work as a subproject
This commit is contained in:
parent
875172e0d8
commit
d4573427d9
|
@ -20,6 +20,7 @@ foreach example: libostd_examples_src
|
|||
[example],
|
||||
dependencies: [libostd, thread_dep],
|
||||
include_directories: libostd_includes,
|
||||
cpp_args: extra_cxxflags,
|
||||
install: false
|
||||
)
|
||||
endforeach
|
||||
|
|
|
@ -16,12 +16,10 @@ unicode_data = join_paths('data', 'UnicodeData-11.0.txt')
|
|||
libostd_includes = [include_directories('.')]
|
||||
|
||||
tgt_compiler_id = meson.get_compiler('cpp').get_id()
|
||||
|
||||
if tgt_compiler_id == 'gcc' or tgt_compiler_id == 'clang'
|
||||
add_global_arguments(
|
||||
'-Wextra', '-Wshadow', '-Wold-style-cast',
|
||||
language: 'cpp'
|
||||
)
|
||||
extra_cxxflags = ['-Wextra', '-Wshadow', '-Wold-style-cast']
|
||||
else
|
||||
extra_cxxflags = []
|
||||
endif
|
||||
|
||||
subdir('src')
|
||||
|
|
|
@ -49,7 +49,7 @@ thread_dep = dependency('threads')
|
|||
libostd_gen_unicode_exe = executable('gen_unicode',
|
||||
['../gen_unicode.cc'],
|
||||
include_directories: libostd_includes,
|
||||
cpp_args: '-DOSTD_GEN_UNICODE_BUILD',
|
||||
cpp_args: extra_cxxflags + ['-DOSTD_GEN_UNICODE_BUILD'],
|
||||
install: false,
|
||||
native: true
|
||||
)
|
||||
|
@ -70,6 +70,7 @@ libostd_lib = library('ostd',
|
|||
libostd_src, libostd_extra_src,
|
||||
dependencies: thread_dep,
|
||||
include_directories: libostd_includes + [include_directories('.')],
|
||||
cpp_args: extra_cxxflags,
|
||||
install: true,
|
||||
version: meson.project_version()
|
||||
)
|
||||
|
|
|
@ -2,6 +2,7 @@ test_runner_exe = executable('test_runner',
|
|||
['test_runner.cc'],
|
||||
dependencies: libostd,
|
||||
include_directories: libostd_includes,
|
||||
cpp_args: extra_cxxflags,
|
||||
install: false
|
||||
)
|
||||
|
||||
|
@ -16,6 +17,7 @@ foreach test_src: libostd_tests_src
|
|||
[test_src],
|
||||
dependencies: libostd,
|
||||
include_directories: libostd_includes,
|
||||
cpp_args: extra_cxxflags,
|
||||
install: false
|
||||
)
|
||||
endforeach
|
||||
|
|
Loading…
Reference in a new issue