Revision control

++ // Copyright (C) 2026 The Qt Company Ltd.
++ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
++
++ /*!
++ \page qt-cmake-policy-qtp0008.html
++ \ingroup qt-cmake-policies
++ \since 6.12
++ \title QTP0008
++ \keyword qt_cmake_policy_qtp0008
++
++ \summary {Forwards deploy script arguments without re-evaluating them.}
++
++ This policy was introduced in Qt 6.12. The policy affects how the version-less
++ \l{qt_generate_deploy_script()} and \l{qt_generate_deploy_app_script()} commands pass
++ their arguments to the implementation code.
++
++ Both commands used to be macros. A macro substitutes its arguments textually and
++ the result is parsed again, so escape sequences and \c{${}} references in the
++ argument values were evaluated a second time. Projects had to escape such values
++ twice to compensate.
++
++ If the policy is set to \c OLD, the values are forwarded through a macro, so they
++ are re-evaluated the way they used to be.
++
++ If the policy is set to \c NEW, the values are forwarded through a function, so
++ they remain unchanged.
++
++ When the policy is not set, the values are re-evaluated as with \c OLD, and an
++ \c{AUTHOR_WARNING} is emitted, but only if the re-evaluation actually changes one
++ of the values. The warning shows the values before and after, so that it is clear
++ what has to be adapted.
++
++ Consider the code snippet below:
++ \badcode
++ qt_generate_deploy_script(
++ OUTPUT_SCRIPT deploy_script
++ CONTENT "
++ qt_deploy_qt_conf(\"\${QT_DEPLOY_PREFIX}/qt.conf\")
++ "
++ )
++ \endcode
++
++ With the policy unset or \c OLD, the reference is expanded while the arguments are
++ forwarded, and the generated script ends up with \c{qt_deploy_qt_conf("/qt.conf")}.
++ With the policy set to \c NEW, the reference reaches the generated script and is
++ expanded when that script runs.
++
++ A forwarded value that contains an invalid backslash escape will fail
++ at command invocation while the policy is unset or \c OLD.
++ An \c{AUTHOR_WARNING} is emitted referencing this policy before the error is
++ reported by CMake.
++
++ \qtpolicydeprecatedbehavior
++
++ \sa qt_policy(), {Qt CMake policies}, qt_generate_deploy_script(),
++ qt_generate_deploy_app_script()
++
++ */