diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-03-22 09:05:15 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-06-29 15:18:06 +0200 |
commit | afcb29bab25c2a7dd7fe6222e94879d418bf4074 (patch) | |
tree | 8640faf0cb94737c85e90bd7a58133b1d592237e /sources | |
parent | 387c1b84b5eae22dd394aac24bc73fdcac24a7b3 (diff) |
Build with lean Qt headers
This should speed up compilation time.
Task-number: QTBUG-97601
Change-Id: Ibd25739dfe5032113ff9c1df5ff5da4cf9effc2d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'sources')
-rw-r--r-- | sources/pyside6/cmake/Macros/PySideModules.cmake | 2 | ||||
-rw-r--r-- | sources/pyside6/libpyside/CMakeLists.txt | 2 | ||||
-rw-r--r-- | sources/pyside6/libpysideqml/CMakeLists.txt | 2 | ||||
-rw-r--r-- | sources/shiboken6/ApiExtractor/CMakeLists.txt | 4 | ||||
-rw-r--r-- | sources/shiboken6/generator/CMakeLists.txt | 2 |
5 files changed, 10 insertions, 2 deletions
diff --git a/sources/pyside6/cmake/Macros/PySideModules.cmake b/sources/pyside6/cmake/Macros/PySideModules.cmake index d722b4650..7d49f2ac9 100644 --- a/sources/pyside6/cmake/Macros/PySideModules.cmake +++ b/sources/pyside6/cmake/Macros/PySideModules.cmake @@ -162,6 +162,8 @@ macro(create_pyside_module) append_size_optimization_flags(${module_NAME}) + target_compile_definitions(${module_NAME} PRIVATE -DQT_LEAN_HEADERS=1) + set_target_properties(${module_NAME} PROPERTIES PREFIX "" OUTPUT_NAME "${module_NAME}${SHIBOKEN_PYTHON_EXTENSION_SUFFIX}" diff --git a/sources/pyside6/libpyside/CMakeLists.txt b/sources/pyside6/libpyside/CMakeLists.txt index 747cc0e79..4c3aa25da 100644 --- a/sources/pyside6/libpyside/CMakeLists.txt +++ b/sources/pyside6/libpyside/CMakeLists.txt @@ -58,6 +58,8 @@ target_include_directories(pyside6 PUBLIC $<INSTALL_INTERFACE:include/PySide6> ) +target_compile_definitions(pyside6 PRIVATE -DQT_LEAN_HEADERS=1) + target_link_libraries(pyside6 PRIVATE Shiboken6::libshiboken ${libpyside_libraries}) diff --git a/sources/pyside6/libpysideqml/CMakeLists.txt b/sources/pyside6/libpysideqml/CMakeLists.txt index 42238c8cb..c092d1c9c 100644 --- a/sources/pyside6/libpysideqml/CMakeLists.txt +++ b/sources/pyside6/libpysideqml/CMakeLists.txt @@ -30,6 +30,8 @@ set_target_properties(pyside6qml PROPERTIES OUTPUT_NAME "pyside6qml${pyside6_SUFFIX}${SHIBOKEN_PYTHON_SHARED_LIBRARY_SUFFIX}" DEFINE_SYMBOL BUILD_LIBPYSIDEQML) +target_compile_definitions(pyside6qml PRIVATE -DQT_LEAN_HEADERS=1) + set_property(TARGET pyside6 PROPERTY CXX_STANDARD 17) if(PYSIDE_QT_CONF_PREFIX) diff --git a/sources/shiboken6/ApiExtractor/CMakeLists.txt b/sources/shiboken6/ApiExtractor/CMakeLists.txt index 0239df31f..2a779dad6 100644 --- a/sources/shiboken6/ApiExtractor/CMakeLists.txt +++ b/sources/shiboken6/ApiExtractor/CMakeLists.txt @@ -91,7 +91,9 @@ if (NOT DISABLE_DOCSTRINGS) qtdocparser.cpp) endif() -target_compile_definitions(apiextractor PRIVATE CMAKE_CXX_COMPILER="${CMAKE_CXX_COMPILER}") +target_compile_definitions(apiextractor + PRIVATE CMAKE_CXX_COMPILER="${CMAKE_CXX_COMPILER}" + PRIVATE QT_LEAN_HEADERS=1) set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE) diff --git a/sources/shiboken6/generator/CMakeLists.txt b/sources/shiboken6/generator/CMakeLists.txt index d2c91844f..276661ab9 100644 --- a/sources/shiboken6/generator/CMakeLists.txt +++ b/sources/shiboken6/generator/CMakeLists.txt @@ -30,7 +30,7 @@ target_include_directories(shiboken6 PRIVATE target_link_libraries(shiboken6 apiextractor Qt${QT_MAJOR_VERSION}::Core) if (NOT DISABLE_DOCSTRINGS) target_sources(shiboken6 PRIVATE qtdoc/qtxmltosphinx.cpp qtdoc/qtdocgenerator.cpp) - target_compile_definitions(shiboken6 PUBLIC DOCSTRINGS_ENABLED) + target_compile_definitions(shiboken6 PUBLIC DOCSTRINGS_ENABLED QT_LEAN_HEADERS=1) endif() configure_file(shibokenconfig.h.in "${CMAKE_CURRENT_BINARY_DIR}/shibokenconfig.h" @ONLY) |