mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
This introduces concurrent thread processing in the `_autogen` target wich processes AUTOMOC and AUTOUIC. Source file parsing is distributed among the threads by using a job queue from which the threads pull new parse jobs. Each thread might start an independent ``moc`` or ``uic`` process. Altogether this roughly speeds up the AUTOMOC and AUTOUIC build process by the number of physical CPUs on the host system. The exact number of threads to start in the `_autogen` target is controlled by the new AUTOGEN_PARALLEL target property which is initialized by the new CMAKE_AUTOGEN_PARALLEL variable. If AUTOGEN_PARALLEL is empty or unset (which is the default) the thread count is set to the number of physical CPUs on the host system. The AUTOMOC/AUTOUIC generator and the AUTORCC generator are refactored to use a libuv loop internally. Closes #17422.
33 lines
1.2 KiB
CMake
33 lines
1.2 KiB
CMake
# Meta
|
|
set(AM_MULTI_CONFIG @_multi_config@)
|
|
set(AM_PARALLEL @_parallel@)
|
|
# Directories and files
|
|
set(AM_CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@/")
|
|
set(AM_CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@/")
|
|
set(AM_CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@/")
|
|
set(AM_CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@/")
|
|
set(AM_CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE "@CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE@")
|
|
set(AM_BUILD_DIR @_build_dir@)
|
|
set(AM_SOURCES @_sources@)
|
|
set(AM_HEADERS @_headers@)
|
|
set(AM_SETTINGS_FILE @_settings_file@)
|
|
# Qt environment
|
|
set(AM_QT_VERSION_MAJOR @_qt_version_major@)
|
|
set(AM_QT_MOC_EXECUTABLE @_qt_moc_executable@)
|
|
set(AM_QT_UIC_EXECUTABLE @_qt_uic_executable@)
|
|
# MOC settings
|
|
set(AM_MOC_SKIP @_moc_skip@)
|
|
set(AM_MOC_DEFINITIONS @_moc_compile_defs@)
|
|
set(AM_MOC_INCLUDES @_moc_include_dirs@)
|
|
set(AM_MOC_OPTIONS @_moc_options@)
|
|
set(AM_MOC_RELAXED_MODE @_moc_relaxed_mode@)
|
|
set(AM_MOC_MACRO_NAMES @_moc_macro_names@)
|
|
set(AM_MOC_DEPEND_FILTERS @_moc_depend_filters@)
|
|
set(AM_MOC_PREDEFS_CMD @_moc_predefs_cmd@)
|
|
# UIC settings
|
|
set(AM_UIC_SKIP @_uic_skip@)
|
|
set(AM_UIC_TARGET_OPTIONS @_uic_target_options@)
|
|
set(AM_UIC_OPTIONS_FILES @_qt_uic_options_files@)
|
|
set(AM_UIC_OPTIONS_OPTIONS @_qt_uic_options_options@)
|
|
set(AM_UIC_SEARCH_PATHS @_uic_search_paths@)
|