qt_allow_non_utf8_sources

防止强制将源文件视为 UTF-8 for Windows。

The command is defined in the Core 组件对于 Qt6 package. Load the package with:

find_package(Qt6 COMPONENTS Core REQUIRED)
					

概要

qt_allow_non_utf8_sources(target)
					

versionless commands are disabled, use qt6_allow_non_utf8_sources() instead. It supports the same set of arguments as this command.

描述

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 calling qt_allow_non_utf8_sources() and passing the target as the argument.

另请参阅 qt_disable_unicode_defines ().