summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-07-30 17:51:07 +0200
committerAlexey Edelev <alexey.edelev@qt.io>2021-08-27 11:01:47 +0200
commite1fe816d4662875032946844fadfed3ea691fdd8 (patch)
treeacbf411b2ca012bbe7b1be8d9659ff210e5ad455 /tests/auto/cmake
parent928ffbd1e20860fdcfbddde8e39303252a9ebb98 (diff)
Implement generating of private cpp exports
Add the generating of private cpp exports for Qt modules. Add the GENERATE_PRIVATE_CPP_EXPORTS option to qt_internal_add_module that is the manual switch for private exports generator. Existing modules in qtbase doesn't follow any strict convention of using private cpp export. So there is no clue how to detect if generating of the private exports is required or not for the module. Use autogenerated private cpp exports in QtNetwork module. CPP_EXPORT_HEADER_NAME argument of the qt_internal_add_module function is replaced by the CPP_EXPORT_HEADER_BASE_NAME and has a different meaning. The provided name is used as a base name for the private and non-private headers that contains cpp exports. Header files suffixes are constant: .h and _p.h for the non-private and private header files accordingly. Pick-to: 6.2 Task-number: QTBUG-90492 Change-Id: Icf11304e00379fb8521a865965c19b974e01e62f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto/cmake')
-rw-r--r--tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/CMakeLists.txt4
-rw-r--r--tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/module_api.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/CMakeLists.txt b/tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/CMakeLists.txt
index 0eaa2cd0db..e1735a3f9f 100644
--- a/tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/CMakeLists.txt
+++ b/tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/CMakeLists.txt
@@ -1,7 +1,7 @@
qt_internal_add_module(TestAutogeneratingCppExportsCustomName
GENERATE_CPP_EXPORTS
- CPP_EXPORT_HEADER_NAME
- "customname_exports.hpp"
+ CPP_EXPORT_HEADER_BASE_NAME
+ "customname_exports"
SOURCES
module_api.h
module_api.cpp
diff --git a/tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/module_api.h b/tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/module_api.h
index a954032226..b797609fad 100644
--- a/tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/module_api.h
+++ b/tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/module_api.h
@@ -40,7 +40,7 @@
#ifndef MODULE_API_H
#define MODULE_API_H
-#include <QtTestAutogeneratingCppExportsCustomName/customname_exports.hpp>
+#include <QtTestAutogeneratingCppExportsCustomName/customname_exports.h>
struct Q_TESTAUTOGENERATINGCPPEXPORTSCUSTOMNAME_EXPORT TestApi
{