From 861664b9d9f5c53f2ac1fd3ee1fccc9c45192f25 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Tue, 16 Jul 2024 11:20:53 +0200 Subject: [PATCH] Add documentation for the QT_NO_UTF8_SOURCE property Add the missing documentation for the QT_NO_UTF8_SOURCE. The property can be set directly or using the qt6_allow_non_utf8_sources function. Fixes: QTBUG-126435 Pick-to: 6.7 6.5 Change-Id: I2a255e6d4f761f14a2fa30ae51b4f671ed75586f Reviewed-by: Joerg Bornemann Reviewed-by: Leena Miettinen (cherry picked from commit 37e6159ab0c1456e8dc38f38f3b21643585c1273) Reviewed-by: Qt Cherry-pick Bot --- .../doc/src/cmake/cmake-properties.qdoc | 23 +++++++++++++++++++ .../src/cmake/qt_allow_non_utf8_sources.qdoc | 1 + 2 files changed, 24 insertions(+) diff --git a/src/corelib/doc/src/cmake/cmake-properties.qdoc b/src/corelib/doc/src/cmake/cmake-properties.qdoc index 4b602d5d075..f844fc3e701 100644 --- a/src/corelib/doc/src/cmake/cmake-properties.qdoc +++ b/src/corelib/doc/src/cmake/cmake-properties.qdoc @@ -488,6 +488,29 @@ That library provides implementations of main (or WinMain). On targets that must provide their own entry point, set the property \c qt_no_entrypoint to inhibit linking against Qt's entrypoint library. */ +/*! +\page cmake-target-property-qt-no-utf8-source.html +\ingroup cmake-properties-qtcore +\ingroup cmake-target-properties-qtcore + +\title QT_NO_UTF8_SOURCE +\target cmake-target-property-QT_NO_UTF8_SOURCE + +\summary {Prevents forcing source files to be treated as UTF-8 for Windows.} + +\cmakepropertysince 6.0 + +When building with some compilers for Windows, targets that link to a Qt library +will use flags that force the compiler to treat its source files as UTF-8. This +is currently implemented for Visual Studio and Intel compilers. You can disable +this behavior on a per-target basis by setting the property to \c TRUE: +\badcode +set_property(TARGET target_name PROPERTY QT_NO_UTF8_SOURCE TRUE) +\endcode + +\sa {qt6_disable_unicode_defines}{qt_disable_unicode_defines()}{qt6_allow_non_utf8_sources()} +*/ + /*! \page cmake-target-property-qt-resource-prefix.html \ingroup cmake-properties-qtcore diff --git a/src/corelib/doc/src/cmake/qt_allow_non_utf8_sources.qdoc b/src/corelib/doc/src/cmake/qt_allow_non_utf8_sources.qdoc index ad95401f4d9..6e972ba63a1 100644 --- a/src/corelib/doc/src/cmake/qt_allow_non_utf8_sources.qdoc +++ b/src/corelib/doc/src/cmake/qt_allow_non_utf8_sources.qdoc @@ -31,4 +31,5 @@ this behavior on a per-target basis by calling \c{qt_allow_non_utf8_sources()} and passing the target as the argument. \sa {qt6_disable_unicode_defines}{qt_disable_unicode_defines()} + {cmake-target-property-QT_NO_UTF8_SOURCE} */