diff options
author | Aleix Pol <aleixpol@kde.org> | 2020-04-17 00:45:31 +0200 |
---|---|---|
committer | Aleix Pol <aleixpol@kde.org> | 2020-04-18 02:04:10 +0200 |
commit | 3734a5368e44a3cef42faed41b0044679d16459d (patch) | |
tree | 2b8a83584eca1e04066f3b08eb39d39a306cf797 /find-modules | |
parent | c59d64f7a93354b9769f13e702ad04afee25f8a1 (diff) | |
download | extra-cmake-modules-3734a5368e44a3cef42faed41b0044679d16459d.tar.gz extra-cmake-modules-3734a5368e44a3cef42faed41b0044679d16459d.tar.bz2 |
Fix wayland scanner warnings
Summary: Tells cmake not to automoc certain files that don't need it, which would become a big fuss on the cmake output.
Test Plan: No warnings
Reviewers: #build_system, #kwin, #frameworks, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kde-frameworks-devel, kde-buildsystem
Tags: #frameworks, #build_system
Differential Revision: https://phabricator.kde.org/D28900
Diffstat (limited to 'find-modules')
-rw-r--r-- | find-modules/FindQtWaylandScanner.cmake | 5 | ||||
-rw-r--r-- | find-modules/FindWaylandScanner.cmake | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/find-modules/FindQtWaylandScanner.cmake b/find-modules/FindQtWaylandScanner.cmake index 0854d0fd..25c55ccb 100644 --- a/find-modules/FindQtWaylandScanner.cmake +++ b/find-modules/FindQtWaylandScanner.cmake @@ -138,6 +138,7 @@ function(ecm_add_qtwayland_client_protocol out_var) BASENAME ${ARGS_BASENAME}) get_filename_component(_infile ${ARGS_PROTOCOL} ABSOLUTE) + set(_ccode "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-client-protocol.c") set(_cheader "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-client-protocol.h") set(_header "${CMAKE_CURRENT_BINARY_DIR}/qwayland-${ARGS_BASENAME}.h") set(_code "${CMAKE_CURRENT_BINARY_DIR}/qwayland-${ARGS_BASENAME}.cpp") @@ -152,6 +153,8 @@ function(ecm_add_qtwayland_client_protocol out_var) COMMAND ${QtWaylandScanner_EXECUTABLE} client-code ${_infile} "" ${_prefix} > ${_code} DEPENDS ${_infile} ${_header} VERBATIM) + set_property(SOURCE ${_header} ${_code} ${_cheader} ${_ccode} PROPERTY SKIP_AUTOMOC ON) + list(APPEND ${out_var} "${_code}") set(${out_var} ${${out_var}} PARENT_SCOPE) endfunction() @@ -187,6 +190,8 @@ function(ecm_add_qtwayland_server_protocol out_var) COMMAND ${QtWaylandScanner_EXECUTABLE} server-code ${_infile} "" ${_prefix} > ${_code} DEPENDS ${_infile} ${_header} VERBATIM) + set_property(SOURCE ${_header} ${_code} PROPERTY SKIP_AUTOMOC ON) + list(APPEND ${out_var} "${_code}") set(${out_var} ${${out_var}} PARENT_SCOPE) endfunction() diff --git a/find-modules/FindWaylandScanner.cmake b/find-modules/FindWaylandScanner.cmake index ed9c4c4c..0f08f590 100644 --- a/find-modules/FindWaylandScanner.cmake +++ b/find-modules/FindWaylandScanner.cmake @@ -125,7 +125,7 @@ function(ecm_add_wayland_client_protocol out_var) set_source_files_properties(${_client_header} GENERATED) set_source_files_properties(${_code} GENERATED) - set_property(SOURCE ${_client_header} PROPERTY SKIP_AUTOMOC ON) + set_property(SOURCE ${_client_header} ${_code} PROPERTY SKIP_AUTOMOC ON) add_custom_command(OUTPUT "${_client_header}" COMMAND ${WaylandScanner_EXECUTABLE} client-header ${_infile} ${_client_header} |