Use --strict option for wayland-scanner

Make protocol definition errors build errors.

Task-number: QTBUG-73100
Change-Id: I1987bb93117f3bd017449f47eeb7e272597563dc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
Paul Olav Tvete 2020-07-07 15:23:25 +02:00
parent 0815723d6d
commit bae4e9528a
2 changed files with 4 additions and 4 deletions

View File

@ -14,12 +14,12 @@ function(qt6_generate_wayland_protocol_client_sources target)
add_custom_command( add_custom_command(
OUTPUT "${waylandscanner_header_output}" OUTPUT "${waylandscanner_header_output}"
#TODO: Maybe put the files in ${CMAKE_CURRENT_BINARY_DIR/wayland_generated instead? #TODO: Maybe put the files in ${CMAKE_CURRENT_BINARY_DIR/wayland_generated instead?
COMMAND Wayland::Scanner --include-core-only client-header < "${protocol_file}" > "${waylandscanner_header_output}" COMMAND Wayland::Scanner --strict --include-core-only client-header < "${protocol_file}" > "${waylandscanner_header_output}"
) )
add_custom_command( add_custom_command(
OUTPUT "${waylandscanner_code_output}" OUTPUT "${waylandscanner_code_output}"
COMMAND Wayland::Scanner --include-core-only public-code < "${protocol_file}" > "${waylandscanner_code_output}" COMMAND Wayland::Scanner --strict --include-core-only public-code < "${protocol_file}" > "${waylandscanner_code_output}"
) )
# TODO: Make this less hacky # TODO: Make this less hacky

View File

@ -13,11 +13,11 @@ function(qt6_generate_wayland_protocol_server_sources target)
add_custom_command( add_custom_command(
OUTPUT "${waylandscanner_header_output}" OUTPUT "${waylandscanner_header_output}"
#TODO: Maybe put the files in ${CMAKE_CURRENT_BINARY_DIR/wayland_generated instead? #TODO: Maybe put the files in ${CMAKE_CURRENT_BINARY_DIR/wayland_generated instead?
COMMAND Wayland::Scanner --include-core-only server-header < "${protocol_file}" > "${waylandscanner_header_output}" COMMAND Wayland::Scanner --strict --include-core-only server-header < "${protocol_file}" > "${waylandscanner_header_output}"
) )
add_custom_command( add_custom_command(
OUTPUT "${waylandscanner_code_output}" OUTPUT "${waylandscanner_code_output}"
COMMAND Wayland::Scanner --include-core-only public-code < "${protocol_file}" > "${waylandscanner_code_output}" COMMAND Wayland::Scanner --strict --include-core-only public-code < "${protocol_file}" > "${waylandscanner_code_output}"
) )
# TODO: make this less hacky # TODO: make this less hacky