Address, and remove an obsolete FIXME comment

If I'm right, it seems that the work has already been done, and nothing
uses the `_qt_internal_wrap_tool_command` anymore.

Change-Id: Ib8a5951e8351a26df123045bb5c6001470650b38
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Amir Masoud Abdol 2022-11-29 16:30:46 +01:00
parent f60d6f4ffa
commit cf471f9a91

View File

@ -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 <SET|APPEND> <command> [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.