aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/meson.build15
-rw-r--r--examples/pugl_vulkan_cpp_demo.cpp2
-rw-r--r--examples/shaders/meson.build6
3 files changed, 14 insertions, 9 deletions
diff --git a/examples/meson.build b/examples/meson.build
index a981cdd..db93f64 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -38,13 +38,12 @@ if get_option('strict')
if cc.get_id() == 'clang'
example_c_args += [
'-Wno-float-equal',
- '-Wno-padded',
'-Wno-reserved-id-macro',
+ '-Wno-reserved-identifier',
]
elif cc.get_id() == 'gcc'
example_c_args += [
'-Wno-float-equal',
- '-Wno-padded',
]
endif
@@ -53,25 +52,29 @@ endif
# Suppress some additional C++ warnings in examples
example_cpp_args = []
-if is_variable('cpp')
+if get_option('strict') and is_variable('cpp')
if cpp.get_id() == 'clang'
example_cpp_args += [
'-Wno-documentation', # Cairo
'-Wno-documentation-unknown-command', # Cairo
'-Wno-old-style-cast',
- '-Wno-padded',
'-Wno-switch-enum',
]
elif cpp.get_id() == 'gcc'
example_cpp_args += [
'-Wno-effc++',
'-Wno-old-style-cast',
- '-Wno-padded',
'-Wno-switch-default',
'-Wno-switch-enum',
'-Wno-unused-const-variable',
'-Wno-useless-cast',
]
+ elif cpp.get_id() == 'msvc'
+ example_cpp_args += [
+ '/wd4355', # 'this' used in base member initializer list
+ '/wd4868', # may not enforce left-to-right evaluation order
+ '/wd5246', # subobject initialization should be wrapped in braces
+ ]
endif
example_cpp_args = cpp.get_supported_arguments(example_cpp_args)
@@ -150,7 +153,7 @@ else
target = example.split('.')[0]
executable(target, example,
include_directories: includes,
- c_args: example_defines + example_c_args,
+ c_args: example_defines + example_c_args + cairo_args,
dependencies: [pugl_dep, cairo_backend_dep])
endforeach
endif
diff --git a/examples/pugl_vulkan_cpp_demo.cpp b/examples/pugl_vulkan_cpp_demo.cpp
index fe86c30..69f360d 100644
--- a/examples/pugl_vulkan_cpp_demo.cpp
+++ b/examples/pugl_vulkan_cpp_demo.cpp
@@ -1716,7 +1716,7 @@ run(const char* const programPath,
app.world.setClassName("PuglVulkanCppDemo");
app.view.setWindowTitle("Pugl Vulkan C++ Demo");
app.view.setSizeHint(pugl::SizeHint::defaultSize, width, height);
- app.view.setSizeHint(pugl::SizeHint::minSize, width / 4, height / 4);
+ app.view.setSizeHint(pugl::SizeHint::minSize, width / 4u, height / 4u);
app.view.setBackend(pugl::vulkanBackend());
app.view.setHint(pugl::ViewHint::resizable, opts.resizable);
const pugl::Status st = app.view.realize();
diff --git a/examples/shaders/meson.build b/examples/shaders/meson.build
index 2fdd946..9121e97 100644
--- a/examples/shaders/meson.build
+++ b/examples/shaders/meson.build
@@ -32,17 +32,19 @@ if vulkan_dep.found()
build_by_default: true,
capture: true)
+ glslang_command = [glslang, '-V', '-o', '@OUTPUT@', '@INPUT@']
+
rect_vert_spv = custom_target('rect.vert.spv',
output: 'rect.vert.spv',
input: rect_vulkan_vert,
- command: [glslang, '-V', '-o', '@OUTPUT@', '@INPUT@'],
+ command: glslang_command,
build_by_default: true,
install: false)
rect_frag_spv = custom_target('rect.frag.spv',
output: 'rect.frag.spv',
input: rect_vulkan_frag,
- command: [glslang, '-V', '-o', '@OUTPUT@', '@INPUT@'],
+ command: glslang_command,
build_by_default: true,
install: false)
endif