Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
6.4.0 FF
Description
https://www.qt.io/blog/qml-type-compilation says "The source code of that example is available in the qtdeclarative repository." Fine, so try to build it:
$ cd qtdeclarative/src/qml/doc/snippets/qmltc $ cmake . CMake Warning (dev) in CMakeLists.txt: No project() command is present. The top-level CMakeLists.txt file must contain a literal, direct call to the project() command. Add a line of code such as project(ProjectName) near the top of the file, but after cmake_minimum_required(). CMake is pretending there is a "project(Project)" command on the first line. This warning is for project developers. Use -Wno-dev to suppress it. -- The C compiler identification is GNU 11.2.0 -- The CXX compiler identification is GNU 11.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/lib/ccache/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/lib/ccache/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at CMakeLists.txt:11 (qt_internal_add_test): Unknown CMake command "qt_internal_add_test". CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as cmake_minimum_required(VERSION 3.23) should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it. -- Configuring incomplete, errors occurred! See also "/home/rutledge/dev/qt6/qtdeclarative/src/qml/doc/snippets/qmltc/CMakeFiles/CMakeOutput.log".
You have a whole directory to hold related stuff together for snippets, so why not make it a self-contained example too? Instead it's using qt_internal_add_test, which is not available for users. But OK I guess we value testing in CI more than letting users look at the non-highlighted parts of the snippets?
Better yet, maybe we need another example to demonstrate how to use qmltc and qmlcachegen together, or just start routinely using them together in multiple examples, if that's what we expect users to do now.
Attachments
Issue Links
- relates to
-
QTBUG-105538 qmltc evolution collection task
- Open
Gerrit Reviews
For Gerrit Dashboard: QTBUG-102837 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
460404,16 | Add buildable qmltc example | dev | qt/qtdeclarative | Status: ABANDONED | -1 | 0 |