more generic handling of warning args and default to debugoptimized
parent
45b1535685
commit
5b104da85b
18
meson.build
18
meson.build
|
@ -1,6 +1,6 @@
|
|||
project('libcubescript', ['cpp'],
|
||||
version: '0.1.0',
|
||||
default_options: ['buildtype=plain', 'cpp_std=c++2a'],
|
||||
default_options: ['buildtype=debugoptimized', 'cpp_std=c++2a'],
|
||||
meson_version: '>=0.46'
|
||||
)
|
||||
|
||||
|
@ -13,11 +13,17 @@ dir_package_include = join_paths(dir_include, 'cubescript')
|
|||
|
||||
libcubescript_includes = [include_directories('include')]
|
||||
|
||||
tgt_compiler_id = meson.get_compiler('cpp').get_id()
|
||||
if tgt_compiler_id == 'gcc' or tgt_compiler_id == 'clang'
|
||||
extra_cxxflags = ['-Wextra', '-Wshadow', '-Wold-style-cast']
|
||||
else
|
||||
extra_cxxflags = []
|
||||
cxx = meson.get_compiler('cpp')
|
||||
|
||||
extra_cxxflags = []
|
||||
|
||||
if get_option('buildtype') != 'plain'
|
||||
if cxx.has_argument('-Wshadow')
|
||||
extra_cxxflags += '-Wshadow'
|
||||
endif
|
||||
if cxx.has_argument('-Wold-style-cast')
|
||||
extra_cxxflags += '-Wold-style-cast'
|
||||
endif
|
||||
endif
|
||||
|
||||
subdir('src')
|
||||
|
|
Loading…
Reference in New Issue