QT_QML_NO_CACHE_GEN

이 변수는 Qt 6.8.1에 도입되었습니다.

QT_QML_NO_CACHEGEN qt6_add_qml_module()에 의해 생성된 QML 타겟에 대해 QML 파일을 바이트코드 또는 C++ 코드로 컴파일하지 않도록 설정할 수 있는 CMake 변수입니다.

qt6_add_qml_module()NO_CACHEGEN 옵션을 설정하는 것과 동일한 효과가 있지만 디렉터리 또는 프로젝트 단위로 설정할 수 있습니다.

이 옵션을 켜면 빌드를 완료하는 데 필요한 빌드 단계 수를 줄여 개발-디버그 반복 주기를 단축할 수 있습니다.

애플리케이션 크기를 최소화하려면 이 옵션을 끄고 대신 QT_DISCARD_FILE_CONTENTS를 사용하여 리소스 시스템에 포함된 QML 파일을 제거하세요.

이 변수는 프로젝트의 CMakeLists.txt에서 다음과 같이 설정할 수 있습니다:

set(QT_QML_NO_CACHEGEN TRUE)
qt_add_qml_module(MyModule
    URI MyModule
    VERSION 1.0
    ...
)

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.