aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-03-01 11:21:14 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-04-11 19:44:00 +0000
commit641b56e52c9c416da7a471106bae0973196468d5 (patch)
treef7654d966725bd55a1dcd7cab128246826a4f667
parentdcf26802199655b7e41d7ba8b81dbb06305f2dc1 (diff)
coin: Allow using configure instead of cmake for top-level builds
This is the qt5 counterpart to the qtbase instructions to allow using configure instead of cmake when configuring a top-level build. Task-number: QTQAINFRA-4357 Task-number: QTQAINFRA-4815 Change-Id: Ie5af31f9349a6dd88fa7699d40dad659180814e2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Toni Saario <toni.saario@qt.io> (cherry picked from commit 2ee43055ed4af2571049e7729066975e92a0db2d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--coin/instructions/coin_qt_configure.yaml35
-rw-r--r--coin/instructions/prepare_configure_executable.yaml37
2 files changed, 71 insertions, 1 deletions
diff --git a/coin/instructions/coin_qt_configure.yaml b/coin/instructions/coin_qt_configure.yaml
index e1b445c1..c1650256 100644
--- a/coin/instructions/coin_qt_configure.yaml
+++ b/coin/instructions/coin_qt_configure.yaml
@@ -7,10 +7,43 @@ instructions:
directory: "{{.SourceDir}}"
- type: ChangeDirectory
directory: "{{.BuildDir}}"
+
+ - !include "{{qt/qt5}}/prepare_configure_executable.yaml"
+
+ - type: EnvironmentVariable
+ variableName: COIN_CONFIGURE_ARGS
+ variableValue: "{{.Env.CONFIGURE_ARGS}}"
+ - type: EnvironmentVariable
+ variableName: COIN_CMAKE_ARGS
+ # Use unix separators even on Windows, to avoid escaping issues in the configure script.
+ variableValue: "{{.Env.CMAKE_ARGS}} {{.Env.COMMON_CMAKE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{unixPathSeparators .InstallDir}}"
+ - type: EnvironmentVariable
+ variableName: CONFIGURE_ENV_PREFIX
+ variableValue: "{{.Env.ENV_PREFIX}}"
+
- type: ExecuteCommand
- command: "{{.Env.ENV_PREFIX}} cmake {{.Env.CONFIGURE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}} -DQT_BUILD_TESTS=OFF {{.SourceDir}}"
+ # There is no SourceDir on purpose, because configure is called directly from qtbase,
+ # so the script knows it's own source dir.
+ # TODO: Consider removing these instructions, and using the ones in qtbase/call_configure_qtbase.yaml
+ # once all dependencies are propagated.
+ 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
diff --git a/coin/instructions/prepare_configure_executable.yaml b/coin/instructions/prepare_configure_executable.yaml
new file mode 100644
index 00000000..50474cc5
--- /dev/null
+++ b/coin/instructions/prepare_configure_executable.yaml
@@ -0,0 +1,37 @@
+# Call either cmake or configure depending on whether the
+# UseConfigure platform configuration feature is set.
+# We should remove the cmake branch, once all platform configurations
+# are ported to use configure.
+# TODO: Remove this file, and reference the one in qtbase, once all
+# all dependencies are propagated.
+type: Group
+instructions:
+ - type: Group
+ enable_if:
+ condition: property
+ property: features
+ contains_value: UseConfigure
+ instructions:
+ - type: EnvironmentVariable
+ variableName: CONFIGURE_EXECUTABLE
+ variableValue: "{{.SourceDir}}/configure"
+ disable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
+ - type: EnvironmentVariable
+ variableName: CONFIGURE_EXECUTABLE
+ variableValue: "{{.SourceDir}}\\configure.bat"
+ enable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
+ - type: Group
+ disable_if:
+ condition: property
+ property: features
+ contains_value: UseConfigure
+ instructions:
+ - type: EnvironmentVariable
+ variableName: CONFIGURE_EXECUTABLE
+ variableValue: "cmake"