Skip to content

Commit

Permalink
CMake: Use the same generator when building other repositories
Browse files Browse the repository at this point in the history
If we configure qtbase with Ninja Multi-Config, we should use the same
generator when building other repositories as well, to ensure that
all repositories have the same set of configurations (debug and
release). To do that, the Coin instructions will call the
qt-cmake-private wrapper which records the generator used.

For standalone tests continue to use qt-cmake, so that only a single
configuration is built (no need to build tests in both debug and
release mode). The configuration built will be the first one from
the initial list with which qtbase was configured (usually
RelWithDebiInfo). This is ensured by the
QtBuildInternalsExtraConfig.cmake file.

Task-number: QTBUG-80900
Change-Id: I701b2f652a22d51e640a6fdf19c3b2d2dfb34d5c
Reviewed-by: Simon Hausmann <[email protected]>
  • Loading branch information
alcroito committed May 19, 2020
1 parent b3e01d6 commit 9410393
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 7 deletions.
4 changes: 2 additions & 2 deletions coin/instructions/call_cmake.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
type: Group
instructions:
- type: ExecuteCommand
command: "{{.Env.ENV_PREFIX}} {{.InstallDir}}\\bin\\qt-cmake {{.Env.COIN_CMAKE_ARGS}}"
command: "{{.Env.ENV_PREFIX}} {{.InstallDir}}\\bin\\qt-cmake-private {{.Env.COIN_CMAKE_ARGS}}"
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
maxTimeInSeconds: 6000
maxTimeBetweenOutput: 1200
Expand All @@ -12,7 +12,7 @@ instructions:
property: host.os
equals_value: Windows
- type: ExecuteCommand
command: "{{.InstallDir}}/bin/qt-cmake {{.Env.COIN_CMAKE_ARGS}}"
command: "{{.InstallDir}}/bin/qt-cmake-private {{.Env.COIN_CMAKE_ARGS}}"
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
maxTimeInSeconds: 6000
maxTimeBetweenOutput: 1200
Expand Down
24 changes: 24 additions & 0 deletions coin/instructions/call_cmake_for_standalone_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
type: Group
instructions:
- type: ExecuteCommand
command: "{{.Env.ENV_PREFIX}} {{.InstallDir}}\\bin\\qt-cmake {{.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
- type: ExecuteCommand
command: "{{.InstallDir}}/bin/qt-cmake {{.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
4 changes: 2 additions & 2 deletions coin/instructions/call_host_cmake.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
type: Group
instructions:
- type: ExecuteCommand
command: "{{.Env.ENV_PREFIX}} {{.InstallDir}}\\host\\bin\\qt-cmake {{.Env.COIN_CMAKE_ARGS}}"
command: "{{.Env.ENV_PREFIX}} {{.InstallDir}}\\host\\bin\\qt-cmake-private {{.Env.COIN_CMAKE_ARGS}}"
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
maxTimeInSeconds: 6000
maxTimeBetweenOutput: 1200
Expand All @@ -12,7 +12,7 @@ instructions:
property: host.os
equals_value: Windows
- type: ExecuteCommand
command: "{{.InstallDir}}/host/bin/qt-cmake {{.Env.COIN_CMAKE_ARGS}}"
command: "{{.InstallDir}}/host/bin/qt-cmake-private {{.Env.COIN_CMAKE_ARGS}}"
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
maxTimeInSeconds: 6000
maxTimeBetweenOutput: 1200
Expand Down
4 changes: 2 additions & 2 deletions coin/instructions/call_target_cmake.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
type: Group
instructions:
- type: ExecuteCommand
command: "{{.Env.TARGET_ENV_PREFIX}} {{.InstallDir}}\\target\\bin\\qt-cmake {{.Env.COIN_CMAKE_ARGS}}"
command: "{{.Env.TARGET_ENV_PREFIX}} {{.InstallDir}}\\target\\bin\\qt-cmake-private {{.Env.COIN_CMAKE_ARGS}}"
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
maxTimeInSeconds: 6000
maxTimeBetweenOutput: 1200
Expand All @@ -12,7 +12,7 @@ instructions:
property: host.os
equals_value: Windows
- type: ExecuteCommand
command: "{{.Env.TARGET_ENV_PREFIX}} {{.InstallDir}}/target/bin/qt-cmake {{.Env.COIN_CMAKE_ARGS}}"
command: "{{.Env.TARGET_ENV_PREFIX}} {{.InstallDir}}/target/bin/qt-cmake-private {{.Env.COIN_CMAKE_ARGS}}"
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
maxTimeInSeconds: 6000
maxTimeBetweenOutput: 1200
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ instructions:
- type: EnvironmentVariable
variableName: COIN_CMAKE_ARGS
variableValue: "-DQT_BUILD_STANDALONE_TESTS=ON -S {{.SourceDir}} -B ."
- !include "{{qt/qtbase}}/call_cmake.yaml"
- !include "{{qt/qtbase}}/call_cmake_for_standalone_tests.yaml"
- type: ExecuteCommand
command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel -v"
maxTimeInSeconds: 6000
Expand Down

0 comments on commit 9410393

Please sign in to comment.