Add options to manage the common files
- Add the 'commonLibrary' option to manage common files.
The following generation mode types for common classes are
possible:
* 'Use-Common-Lib' generates common files as a separate library.
* 'Skip-Common-Files' doesn't generate common files at all.
NOTE:
'Skip-Common-Files' is required to reduce the generation
of common resources. If another client has already generated it,
it makes sense to avoid generating the Common library.
Usage of the 'commonLibrary' option:
'--additional-properties=commonLibrary=Skip-Common-Files'
- Add 'commonLibraryName' option that allows to choose the unique
name for the common library.
Usage of the 'commonLibraryName' option:
'--additional-properties=commonLibrary=Use-Common-Lib,commonLibraryName=MyCommonTestName'
NOTE:
Integrating the possibility to have a uniquely named common library
helps us to prevent name duplication problems in the
configuration of qtopenapi sub-module auto-tests.
- Add a test.
- Add 'linkage-test' option into the generate.sh.
Task-number: QTBUG-140233
Change-Id: Iabe28b8c208d6825a24f25b8ce7c97d53f4c9d80
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
| commit | 5d5e465366efd7c0530c2316ee97db725d684382 |
| parent | 910d1dba29387f6723da0fa67436835af639732f |
| author | Tatiana Borisova <tatiana.borisova@qt.io> |
| committer | Tatiana Borisova <tatiana.borisova@qt.io> |
| commit time | Tue, 28 Oct 2025 13:13:42 +0100 |
- M .gitignore
- M generate.sh
- M src/tools/qtopenapi-generator/src/main/java/org/qtproject/qt/codegen/CppQt6ClientGenerator.java
- M src/tools/qtopenapi-generator/src/main/resources/cpp-qt6-client/CMakeLists.txt.mustache
- M src/tools/qtopenapi-generator/src/main/resources/cpp-qt6-client/Project.mustache
- A src/tools/qtopenapi-generator/src/main/resources/cpp-qt6-client/common/CMakeConfig.mustache
- A src/tools/qtopenapi-generator/src/main/resources/cpp-qt6-client/common/CMakeLists.txt.mustache
- M tests/auto/CMakeLists.txt
- A tests/auto/linking_several_clients/CMakeLists.txt
- A tests/auto/linking_several_clients/application/CMakeLists.txt
- A tests/auto/linking_several_clients/application/TestConfiguration1.cpp
- A tests/auto/linking_several_clients/client1/client/CMakeLists.txt
- A tests/auto/linking_several_clients/client1/client/Config.cmake.in
- A tests/auto/linking_several_clients/client1/client/QtOAIClient1TestApi.cpp
- A tests/auto/linking_several_clients/client1/client/QtOAIClient1TestApi.h
- A tests/auto/linking_several_clients/client1/client/README.md
- A tests/auto/linking_several_clients/client1/client/client.pri
- A tests/auto/linking_several_clients/client1/client/doc/Doxyfile.in
- A tests/auto/linking_several_clients/client1/common/CMakeLists.txt
- A tests/auto/linking_several_clients/client1/common/Config.cmake.in
- A tests/auto/linking_several_clients/client1/common/QtOAIBaseApi.cpp
- A tests/auto/linking_several_clients/client1/common/QtOAIBaseApi.h
- A tests/auto/linking_several_clients/client1/common/QtOAIEnum.h
- A tests/auto/linking_several_clients/client1/common/QtOAIHelpers.cpp
- A tests/auto/linking_several_clients/client1/common/QtOAIHelpers.h
- A tests/auto/linking_several_clients/client1/common/QtOAIHttpFileElement.cpp
- A tests/auto/linking_several_clients/client1/common/QtOAIHttpFileElement.h
- A tests/auto/linking_several_clients/client1/common/QtOAIHttpRequest.cpp
- A tests/auto/linking_several_clients/client1/common/QtOAIHttpRequest.h
- A tests/auto/linking_several_clients/client1/common/QtOAIObject.h
- A tests/auto/linking_several_clients/client1/common/QtOAIServerConfiguration.h
- A tests/auto/linking_several_clients/client1/common/QtOAIServerVariable.h
- A tests/auto/linking_several_clients/client2/client/CMakeLists.txt
- A tests/auto/linking_several_clients/client2/client/Config.cmake.in
- A tests/auto/linking_several_clients/client2/client/QtOAIClient2TestApi.cpp
- A tests/auto/linking_several_clients/client2/client/QtOAIClient2TestApi.h
- A tests/auto/linking_several_clients/client2/client/README.md
- A tests/auto/linking_several_clients/client2/client/client.pri
- A tests/auto/linking_several_clients/client2/client/doc/Doxyfile.in
- A tests/auto/yaml_files/linking_several_clients/client1.yaml
- A tests/auto/yaml_files/linking_several_clients/client2.yaml