Split all code in QtSetup into separate functions and macros, put them in more appropriate files, and call them in qt_internal_setup_build_and_global_variables. A new QtBuildOptionsHelpers.cmake is created which takes care of computing the default values of user-customizable options that are not pure configure features, like the cmake build type, whether to build tests / examples, whether to enable ccache, etc. The new function calls added in qt_internal_setup_build_and_global_variables try to preserve the previous code flow when QtBuild was included in-between the code that was run in QtSetup. Macros that have dependencies on various global variables were marked as such with inline comments for easier navigation and comprehension. After this change, QtSetup.cmake just includes QtBuild.cmake. We leave it to exist for easier git blaming, but new code should not be added to it unless really necessary. The intent is to merge a variant of this change to 6.6 and 6.5 as well. Task-number: QTBUG-86035 Change-Id: I3409c2d3ea8ee19a69104b12ab2692966ba5f9cf Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
7 lines
246 B
CMake
7 lines
246 B
CMake
# Copyright (C) 2022 The Qt Company Ltd.
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
# Any new code should go into QtBuildHelpers.cmake or other appropriate files and then called in
|
|
# qt_internal_setup_build_and_global_variables().
|
|
include(QtBuild)
|