forked from qt/qtbase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coin: Use configure and qt-configure-module in instructions
We want to use configure and qt-configure-module when building in Coin, rather than pure cmake and qt-cmake. There are a few benefits: - CI tests the scripts, making sure we don't introduce regressions - CI uses the same scripts that we mention in our documentation for developers to use - The platform configurations become a bit less verbose and easier to read due to less shouty-case CMake options To ensure a more gradual porting, Coin will only use the new instructions if the 'UseConfigure' feature is set on a platform configuration in qt5.git. This allows going back to the old instructions in case if something isn't working properly. Due the opt-in, we need to support both old and new instructions in the implementation. The change strives to remove as much duplicate code as possible, by moving it into common includes. The README.md is updated to mention the overview of how the different environment variables are used. There are a few important things to point out. 1) Because during the porting we have to allow mixing of the old style and new style, platform configs have to separate CMake-style options from configure-style options in different environment variables. Otherwise the instructions wouldn't be able to create a valid configure call, where all CMake-style options have to go at the end after a double dash --. After all platform configs are ported to the new style, it should be possible to combine all the options in a single environment variable if that is desired, but it will require another round of porting to remove all the '-D' prefixes in CMake-style options, and just use regular variable assignment which configure supports. e.g. -DQT_BUILD_EXAMPLES=ON becomes QT_BUILD_EXAMPLES=ON, which can be mixed in-between configure-style args. 2) Configure is more strict in that it doesn't allow passing unknown options. Due to that, we can't pass non-qtbase configure options via NON_QTBASE_CONFIGURE_ARGS. qt-configure-module would error out in the repos where the configure option is unknown. Because we don't have a Coin configure variable for each repo, we circumvent the issue by continuing to pass CMake-style options via NON_QTBASE_CMAKE_ARGS instead, which does not do validation checks. In the future, we could introduce a configure flag that disables the validation checks. Pick-to: 6.2 6.3 Task-number: QTQAINFRA-4357 Task-number: QTQAINFRA-4815 Change-Id: I72d8ba0b3a543b42982e22ae8d6566c0e885c446 Reviewed-by: Jörg Bornemann <[email protected]> Reviewed-by: Toni Saario <[email protected]>
- Loading branch information
Showing
19 changed files
with
327 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 7 additions & 6 deletions
13
coin/instructions/call_cmake.yaml → coin/instructions/call_configure_module.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
type: Group | ||
instructions: | ||
- !include "{{qt/qtbase}}/prepare_configure_module_executable.yaml" | ||
- type: ExecuteCommand | ||
command: "{{.Env.ENV_PREFIX}} {{.InstallDir}}\\bin\\qt-cmake-private {{.Env.COIN_CMAKE_ARGS}}" | ||
command: "{{.Env.CONFIGURE_ENV_PREFIX}} {{.Env.CONFIGURE_EXECUTABLE}} {{.SourceDir}} {{.Env.COIN_CONFIGURE_ARGS}} -- {{.Env.COIN_CMAKE_ARGS}}" | ||
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution | ||
maxTimeInSeconds: 6000 | ||
maxTimeBetweenOutput: 1200 | ||
userMessageOnFailure: > | ||
Failed to call cmake. | ||
enable_if: | ||
condition: property | ||
property: host.os | ||
equals_value: Windows | ||
property: features | ||
contains_value: UseConfigure | ||
- type: ExecuteCommand | ||
command: "{{.InstallDir}}/bin/qt-cmake-private {{.Env.COIN_CMAKE_ARGS}}" | ||
command: "{{.Env.CONFIGURE_ENV_PREFIX}} {{.Env.CONFIGURE_EXECUTABLE}} {{.SourceDir}} {{.Env.COIN_CONFIGURE_ARGS}} {{.Env.COIN_CMAKE_ARGS}}" | ||
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution | ||
maxTimeInSeconds: 6000 | ||
maxTimeBetweenOutput: 1200 | ||
userMessageOnFailure: > | ||
Failed to call cmake. | ||
disable_if: | ||
condition: property | ||
property: host.os | ||
equals_value: Windows | ||
property: features | ||
contains_value: UseConfigure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
type: Group | ||
instructions: | ||
- !include "{{qt/qtbase}}/prepare_configure_executable.yaml" | ||
- type: ExecuteCommand | ||
# There is no SourceDir on purpose, because configure is called directly from qtbase, | ||
# so the script knows it's own source dir. | ||
command: "{{.Env.CONFIGURE_ENV_PREFIX}} {{.Env.CONFIGURE_EXECUTABLE}} {{.Env.COIN_CONFIGURE_ARGS}} -- {{.Env.COIN_CMAKE_ARGS}}" | ||
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution | ||
maxTimeInSeconds: 6000 | ||
maxTimeBetweenOutput: 1200 | ||
userMessageOnFailure: > | ||
Failed to call cmake. | ||
enable_if: | ||
condition: property | ||
property: features | ||
contains_value: UseConfigure | ||
- type: ExecuteCommand | ||
command: "{{.Env.CONFIGURE_ENV_PREFIX}} {{.Env.CONFIGURE_EXECUTABLE}} {{.SourceDir}} {{.Env.COIN_CONFIGURE_ARGS}} {{.Env.COIN_CMAKE_ARGS}}" | ||
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution | ||
maxTimeInSeconds: 6000 | ||
maxTimeBetweenOutput: 1200 | ||
userMessageOnFailure: > | ||
Failed to call cmake. | ||
disable_if: | ||
condition: property | ||
property: features | ||
contains_value: UseConfigure |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.