diff options
| author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-03-26 17:42:48 +0100 |
|---|---|---|
| committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-04-02 09:39:36 +0200 |
| commit | 622894f96e93d62147a28a6f37b7ee6a90d74042 (patch) | |
| tree | cb6250f435fcab8624312521b16cc768bfe7638b /util/cmake/qmake_parser.py | |
| parent | 560e8547b322b067348f57690462332b5943b394 (diff) | |
CMake: Allow excluding tools and apps from the default 'all' target
Qt uses the qtNomakeTools() function to mark a directory which will
not be built as part of the default target. This is especially
important when cross-compiling (to iOS for example) because the build
process might fail.
The condition for not building these "GUI tool sub-directory projects"
is the absence of the "tools" value in qmake's QT_BUILD_PARTS
variable.
Introduce a QT_NO_MAKE_TOOLS CMake variable. If the value is true,
it's equivalent to "tools" not being present in QT_BUILD_PARTS.
Introduce qt_exclude_tool_directories_from_default_target().
It's the qmake counter part to qtNomakeTools().
Teach pro2cmake to generate it where appropriate.
Change-Id: If2e5958d91847ab139af0e452608510286e73fa0
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'util/cmake/qmake_parser.py')
| -rw-r--r-- | util/cmake/qmake_parser.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/util/cmake/qmake_parser.py b/util/cmake/qmake_parser.py index 5cb629a4953..2fabfe3f019 100644 --- a/util/cmake/qmake_parser.py +++ b/util/cmake/qmake_parser.py @@ -243,6 +243,14 @@ class QmakeParser: "Requires", pp.Keyword("requires") + RequiresCondition("project_required_condition") ) + FunctionArgumentsAsString = add_element( + "FunctionArgumentsAsString", pp.originalTextFor(pp.nestedExpr()) + ) + QtNoMakeTools = add_element( + "QtNoMakeTools", + pp.Keyword("qtNomakeTools") + FunctionArgumentsAsString("qt_no_make_tools_arguments"), + ) + # ignore the whole thing... DefineTestDefinition = add_element( "DefineTestDefinition", @@ -281,6 +289,7 @@ class QmakeParser: | Include | Option | Requires + | QtNoMakeTools | ForLoop | ForLoopSingleLine | DefineTestDefinition |
