diff options
author | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-03-30 16:49:00 +0200 |
---|---|---|
committer | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-04-03 12:41:14 +0200 |
commit | 7e074bd8a0d0137043cf43aa2473d0c3082fe3be (patch) | |
tree | 09f4cf0858a0f27602e35db4ffb5612bad63e12a /src/gui/CMakeLists.txt | |
parent | c19504e708bf099922180ab99f3cf4b94d91fc7e (diff) |
Use Qt CMake APIs to exclude files from Unity Build
This is a bit of a cleanup, mainly around unity build, and a few other
minor things:
- I replaced the direct inclusion of sources files using
`set_source_files_properties`, and instead used
`NO_UNITY_BUILD_SOURCES` when possible. In most cases, they are being
excluded in their respective `qt_internal_extend_target` but sometimes
I had to make a new extension.
- In few cases, we had to manually exclude the NO_PCH files, so, I
instead passed them directly to the NO_PCH_SOURCES which also exclude
them from the unity build as well.
- Removed a few unnecessary ""
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I466576592c1d115a2da4d88672c1e4b9f995f2ed
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/gui/CMakeLists.txt')
-rw-r--r-- | src/gui/CMakeLists.txt | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 3fd28d2a01..b6ecc5f333 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -275,7 +275,7 @@ qt_internal_add_module(Gui PRIVATE_MODULE_INTERFACE Qt::CorePrivate NO_PCH_SOURCES - "painting/qdrawhelper.cpp" + painting/qdrawhelper.cpp PRECOMPILED_HEADER "kernel/qt_gui_pch.h" GENERATE_CPP_EXPORTS @@ -292,9 +292,6 @@ set(qpdf_resource_files "painting/qpdfa_metadata.xml" ) -set_source_files_properties(painting/qdrawhelper.cpp # NO_PCH_SOURCES - PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON) - if(WIN32 OR (UNIX AND NOT APPLE)) set_target_properties(Gui PROPERTIES UNITY_BUILD OFF) # X11 define clashes/Windows oddities. endif() |