diff options
Diffstat (limited to 'test/meson.build')
-rw-r--r-- | test/meson.build | 108 |
1 files changed, 4 insertions, 104 deletions
diff --git a/test/meson.build b/test/meson.build index c47d3ee..d34763f 100644 --- a/test/meson.build +++ b/test/meson.build @@ -17,20 +17,6 @@ if get_option('warning_level') == 'everything' test_c_args = cc.get_supported_arguments(test_c_args) endif -# Suppress some additional C++ warnings in tests -test_cpp_args = [] -if get_option('warning_level') == 'everything' and is_variable('cpp') - if cpp.get_id() == 'clang' - test_cpp_args += [ - '-Wno-documentation', # Cairo - '-Wno-documentation-unknown-command', # Cairo - '-Wno-old-style-cast', - ] - endif - - test_cpp_args = cpp.get_supported_arguments(test_cpp_args) -endif - # Check licensing metadata if not meson.is_subproject() and get_option('lint') reuse = find_program('reuse', required: false) @@ -144,7 +130,6 @@ if vulkan_dep.found() 'test_' + test, 'test_@0@.c'.format(test), c_args: test_c_args, - cpp_args: test_cpp_args, dependencies: [pugl_dep, pugl_vulkan_dep], include_directories: include_directories(includes), ), @@ -153,93 +138,8 @@ if vulkan_dep.found() endforeach endif -unified_args = core_args -unified_deps = [core_deps] -if cairo_dep.found() - unified_args += ['-DWITH_CAIRO'] - unified_deps += [cairo_dep] -endif - -if opengl_dep.found() - unified_args += ['-DWITH_OPENGL'] - unified_deps += [opengl_dep] -endif - -if vulkan_dep.found() - unified_args += ['-DWITH_VULKAN'] - unified_deps += [vulkan_deps] -endif - -if host_machine.system() == 'darwin' - add_languages(['objcpp'], native: false) - - objcpp = meson.get_compiler('objcpp') +####################### +# C++ / Objective C++ # +####################### - objcpp_unified_args = unified_args - if objcpp.get_id() == 'clang' - objcpp_unified_args += [ - '-Wno-c++98-compat', - '-Wno-c++98-compat-pedantic', - '-Wno-deprecated-declarations', - '-Wno-direct-ivar-access', - ] - endif - - objcpp_unified_args = objcpp.get_supported_arguments(objcpp_unified_args) - - test( - 'inline_objcpp', - executable( - 'test_inline_objcpp', - 'test_inline_objcpp.mm', - dependencies: unified_deps, - include_directories: include_directories(includes), - objcpp_args: objcpp_unified_args, - ), - suite: 'unit', - ) - -elif is_variable('cpp') - cpp_unified_args = unified_args - if cpp.get_id() == 'clang' - cpp_unified_args += [ - '-Wno-old-style-cast', - '-Wno-switch-default', - '-Wno-switch-enum', - '-Wno-unused-macros', # Mac - ] - if host_machine.system() == 'windows' - cpp_unified_args += [ - '-Wno-cast-function-type', - '-Wno-deprecated-declarations', - '-Wno-nonportable-system-include-path', - ] - endif - elif cpp.get_id() == 'gcc' - cpp_unified_args += [ - '-Wno-conditionally-supported', - '-Wno-old-style-cast', - '-Wno-switch-default', - '-Wno-switch-enum', - '-Wno-useless-cast', - ] - elif cpp.get_id() == 'msvc' - cpp_unified_args += [ - '/wd4464', # relative include path contains '..' - ] - endif - - cpp_unified_args = cpp.get_supported_arguments(cpp_unified_args) - - test( - 'inline_cpp', - executable( - 'test_inline_cpp', - 'test_inline_cpp.cpp', - cpp_args: cpp_unified_args, - dependencies: unified_deps, - include_directories: include_directories(includes), - ), - suite: 'unit', - ) -endif +subdir('cpp') |