diff --git a/cmake/QtPublicToolHelpers.cmake b/cmake/QtPublicToolHelpers.cmake index 2e39ff0498..031f0a3317 100644 --- a/cmake/QtPublicToolHelpers.cmake +++ b/cmake/QtPublicToolHelpers.cmake @@ -107,38 +107,6 @@ set PATH=${path_dirs};%PATH% set_property(GLOBAL PROPERTY _qt_internal_generate_tool_command_wrapper_called TRUE) endfunction() -# Wraps a tool command with a script that contains the necessary environment for the tool to run -# correctly. -# _qt_internal_wrap_tool_command(var [args...]) -# Arguments: -# APPEND Selects the 'append' mode for the out_variable argument. -# SET Selects the 'set' mode for the out_variable argument. -# -# FIXME: Replace all usages of _qt_internal_wrap_tool_command -# with _qt_internal_get_wrap_tool_script_path and remove the former. -# The former always adds the COMMAND keyword, which does not allow the caller to wrap the -# commands in a generator expression. See _qt_internal_target_enable_qmllint for an example. -function(_qt_internal_wrap_tool_command out_variable action) - set(append FALSE) - if(action STREQUAL "APPEND") - set(append TRUE) - elseif(NOT action STREQUAL "SET") - message(FATAL_ERROR "Invalid action specified ${action}. Supported actions: SET, APPEND") - endif() - - # Ensure the script wrapper exists. - _qt_internal_generate_tool_command_wrapper() - - set(cmd COMMAND ${QT_TOOL_COMMAND_WRAPPER_PATH} ${ARGN}) - - if(append) - list(APPEND ${out_variable} ${cmd}) - else() - set(${out_variable} ${cmd}) - endif() - set(${out_variable} "${${out_variable}}" PARENT_SCOPE) -endfunction() - # Gets the path to tool wrapper shell script. function(_qt_internal_get_tool_wrapper_script_path out_variable) # Ensure the script wrapper exists.