summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--coin/instructions/README.md58
-rw-r--r--coin/instructions/call_configure_module.yaml (renamed from coin/instructions/call_cmake.yaml)13
-rw-r--r--coin/instructions/call_configure_qtbase.yaml27
-rw-r--r--coin/instructions/call_host_cmake.yaml24
-rw-r--r--coin/instructions/call_target_cmake.yaml24
-rw-r--r--coin/instructions/cmake_build_and_upload_test_artifacts_host.yaml2
-rw-r--r--coin/instructions/cmake_build_and_upload_test_artifacts_target.yaml2
-rw-r--r--coin/instructions/cmake_cross_compilation_module_build_instructions.yaml32
-rw-r--r--coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml49
-rw-r--r--coin/instructions/cmake_module_build_instructions.yaml15
-rw-r--r--coin/instructions/cmake_qtbase_build_instructions.yaml22
-rw-r--r--coin/instructions/coin_module_test_docs.yaml9
-rw-r--r--coin/instructions/coin_qtbase_test_docs.yaml17
-rw-r--r--coin/instructions/prepare_building_env.yaml38
-rw-r--r--coin/instructions/prepare_configure_executable.yaml35
-rw-r--r--coin/instructions/prepare_configure_module_executable.yaml46
-rw-r--r--coin/instructions/prepare_install_dir_suffix_host.yaml16
-rw-r--r--coin/instructions/prepare_install_dir_suffix_target.yaml16
-rw-r--r--coin/instructions/qmake_examples/build_qmake_examples_instructions.yaml4
19 files changed, 327 insertions, 122 deletions
diff --git a/coin/instructions/README.md b/coin/instructions/README.md
index aaefe3696f..f366642395 100644
--- a/coin/instructions/README.md
+++ b/coin/instructions/README.md
@@ -18,3 +18,61 @@
the ability to build and run tests for ``qemu`` cross-compiling configurations.
* ``coin_module_test_template_v3`` changed the run test instructions to not ignore the exit code
and thus enforce that tests pass in the CI.
+
+# Environment variable description and usage
+
+The following environment variables are used in Coin instructions when building Qt, tests, etc:
+
+`CONFIGURE_ARGS` - contains platform-specific ``configure-style`` arguments
+ (e.g. `-shared`), that will be passed to a qtbase configure call
+`CMAKE_ARGS` - contains platform-specific ``CMake-style`` arguments
+ (e.g. `-DOPENSSL_ROOT_DIR=Foo`) that will be passed to a qtbase
+ configure call
+`NON_QTBASE_CONFIGURE_ARGS` - contains platform-specific ``configure-style`` arguments
+ that will be passed to a non-qtbase qt-configure-module call
+`NON_QTBASE_CMAKE_ARGS` - contains platform-specific ``CMake-style`` arguments
+ that will be passed to a non-qtbase qt-configure-module call
+`COMMON_CMAKE_ARGS` - platform-independent ``CMake-style`` args set in
+ `prepare_building_env.yaml` that apply to qtbase configurations
+ only.
+`COMMON_NON_QTBASE_CMAKE_ARGS` - platform-independent ``CMake-style`` args set in
+ `prepare_building_env.yaml` that apply to
+ configuration of repos other than qtbase
+`COMMON_TEST_CMAKE_ARGS` - platform-independent ``CMake-style`` args set in
+ `prepare_building_env.yaml` that apply to configuration of
+ all standalone tests
+
+All of the above apply to host builds only.
+
+There is a a set of environment variables that apply to target builds when cross-compiling which
+mirror the ones above. They are:
+
+`TARGET_CONFIGURE_ARGS`
+`TARGET_CMAKE_ARGS`
+`NON_QTBASE_TARGET_CONFIGURE_ARGS`
+`NON_QTBASE_TARGET_CMAKE_ARGS`
+
+`COMMON_TARGET_CMAKE_ARGS`
+`COMMON_NON_QTBASE_TARGET_CMAKE_ARGS`
+`COMMON_TARGET_TEST_CMAKE_ARGS`
+
+Currently, there are no common ``configure-style`` variables for configuring
+repos or tests, only ``CMake-style` ones.
+
+
+`COIN_CMAKE_ARGS` contains the final set of cmake args that is passed to
+`configure` / `qt-configure-module`, it is built up from the variables above + any additional values added
+by custom instructions, like specification of `CMAKE_INSTALL_PREFIX` etc.
+
+`INSTALL_DIR_SUFFIX` is used to append either `/host` or `/target` suffixes to install paths in
+instructions when cross-building.
+
+`CONFIGURE_EXECUTABLE` contains a platform-specific path to `configure` / `qt-configure-module`
+or `cmake`/ `qt-cmake` depending on whether `UseConfigure` feature is enabled.
+
+`CONFIGURE_ENV_PREFIX` contains the value of either `ENV_PREFIX` or `TARGET_ENV_PREFIX` depending on
+whether it's a cross-build configure call. The values are used when configuring and building, to ensure
+that things like compilers are found correctly.
+
+We use `unixPathSeparators` to pass an install prefix with forward slashes even on Windows,
+to avoid escaping issues when using configure.
diff --git a/coin/instructions/call_cmake.yaml b/coin/instructions/call_configure_module.yaml
index 96227c1f6a..e3b28503aa 100644
--- a/coin/instructions/call_cmake.yaml
+++ b/coin/instructions/call_configure_module.yaml
@@ -1,7 +1,8 @@
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
@@ -9,10 +10,10 @@ instructions:
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
@@ -20,5 +21,5 @@ instructions:
Failed to call cmake.
disable_if:
condition: property
- property: host.os
- equals_value: Windows
+ property: features
+ contains_value: UseConfigure
diff --git a/coin/instructions/call_configure_qtbase.yaml b/coin/instructions/call_configure_qtbase.yaml
new file mode 100644
index 0000000000..c08d7151ca
--- /dev/null
+++ b/coin/instructions/call_configure_qtbase.yaml
@@ -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
diff --git a/coin/instructions/call_host_cmake.yaml b/coin/instructions/call_host_cmake.yaml
deleted file mode 100644
index 4182f9b622..0000000000
--- a/coin/instructions/call_host_cmake.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
-type: Group
-instructions:
- - type: ExecuteCommand
- command: "{{.Env.ENV_PREFIX}} {{.InstallDir}}\\host\\bin\\qt-cmake-private {{.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}}/host/bin/qt-cmake-private {{.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
diff --git a/coin/instructions/call_target_cmake.yaml b/coin/instructions/call_target_cmake.yaml
deleted file mode 100644
index e8dc7f3f97..0000000000
--- a/coin/instructions/call_target_cmake.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
-type: Group
-instructions:
- - type: ExecuteCommand
- command: "{{.Env.TARGET_ENV_PREFIX}} {{.InstallDir}}\\target\\bin\\qt-cmake-private {{.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: "{{.Env.TARGET_ENV_PREFIX}} {{.InstallDir}}/target/bin/qt-cmake-private {{.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
diff --git a/coin/instructions/cmake_build_and_upload_test_artifacts_host.yaml b/coin/instructions/cmake_build_and_upload_test_artifacts_host.yaml
index 847d095da9..3592ac4270 100644
--- a/coin/instructions/cmake_build_and_upload_test_artifacts_host.yaml
+++ b/coin/instructions/cmake_build_and_upload_test_artifacts_host.yaml
@@ -10,7 +10,7 @@ instructions:
variableValue: "{{.InstallDir}}"
- type: EnvironmentVariable
variableName: COIN_CMAKE_ARGS
- variableValue: "{{.Env.TEST_CONFIGURE_ARGS}}"
+ variableValue: "{{.Env.COMMON_TEST_CMAKE_ARGS}}"
- !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml"
disable_if:
condition: property
diff --git a/coin/instructions/cmake_build_and_upload_test_artifacts_target.yaml b/coin/instructions/cmake_build_and_upload_test_artifacts_target.yaml
index b34d408f4a..8c3dfe14e1 100644
--- a/coin/instructions/cmake_build_and_upload_test_artifacts_target.yaml
+++ b/coin/instructions/cmake_build_and_upload_test_artifacts_target.yaml
@@ -21,7 +21,7 @@ instructions:
equals_value: Windows
- type: EnvironmentVariable
variableName: COIN_CMAKE_ARGS
- variableValue: "{{.Env.TARGET_TEST_CONFIGURE_ARGS}}"
+ variableValue: "{{.Env.COMMON_TARGET_TEST_CMAKE_ARGS}}"
- !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml"
disable_if:
condition: property
diff --git a/coin/instructions/cmake_cross_compilation_module_build_instructions.yaml b/coin/instructions/cmake_cross_compilation_module_build_instructions.yaml
index 7601cdd4df..ef4d6c2c7b 100644
--- a/coin/instructions/cmake_cross_compilation_module_build_instructions.yaml
+++ b/coin/instructions/cmake_cross_compilation_module_build_instructions.yaml
@@ -30,13 +30,21 @@ instructions:
directory: "{{.SourceDir}}/build/host"
- type: ChangeDirectory
directory: "{{.BuildDir}}"
+
+ - type: EnvironmentVariable
+ variableName: COIN_CONFIGURE_ARGS
+ variableValue: "{{.Env.NON_QTBASE_CONFIGURE_ARGS}}"
- type: EnvironmentVariable
variableName: COIN_CMAKE_ARGS
- # The lack of space between the non qtbase configure args and the rest of the args is important!
- variableValue: "{{.Env.NON_QTBASE_CONFIGURE_ARGS}} {{.SourceDir}}"
- - !include "{{qt/qtbase}}/call_host_cmake.yaml"
+ variableValue: "{{.Env.NON_QTBASE_CMAKE_ARGS}} {{.Env.COMMON_NON_QTBASE_CMAKE_ARGS}}"
+ - type: EnvironmentVariable
+ variableName: CONFIGURE_ENV_PREFIX
+ variableValue: "{{.Env.ENV_PREFIX}}"
+ - !include "{{qt/qtbase}}/prepare_install_dir_suffix_host.yaml"
+ - !include "{{qt/qtbase}}/call_configure_module.yaml"
+
- type: ExecuteCommand
- command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel -v"
+ command: "{{.Env.CONFIGURE_ENV_PREFIX}} cmake --build . --parallel -v"
maxTimeInSeconds: "{{.Env.CMAKE_BUILD_TIMEOUT}}"
maxTimeBetweenOutput: "{{.Env.CMAKE_BUILD_OUTPUT_TIMEOUT}}"
userMessageOnFailure: >
@@ -60,13 +68,21 @@ instructions:
directory: "{{.SourceDir}}/build/target"
- type: ChangeDirectory
directory: "{{.BuildDir}}"
+
+ - type: EnvironmentVariable
+ variableName: COIN_CONFIGURE_ARGS
+ variableValue: "{{.Env.NON_QTBASE_TARGET_CONFIGURE_ARGS}}"
- type: EnvironmentVariable
variableName: COIN_CMAKE_ARGS
- # The lack of space between the non qtbase configure args and the rest of the args is important!
- variableValue: "{{.Env.NON_QTBASE_TARGET_CONFIGURE_ARGS}} {{.SourceDir}}"
- - !include "{{qt/qtbase}}/call_target_cmake.yaml"
+ variableValue: "{{.Env.NON_QTBASE_TARGET_CMAKE_ARGS}} {{.Env.COMMON_NON_QTBASE_TARGET_CMAKE_ARGS}}"
+ - type: EnvironmentVariable
+ variableName: CONFIGURE_ENV_PREFIX
+ variableValue: "{{.Env.TARGET_ENV_PREFIX}}"
+ - !include "{{qt/qtbase}}/prepare_install_dir_suffix_target.yaml"
+ - !include "{{qt/qtbase}}/call_configure_module.yaml"
+
- type: ExecuteCommand
- command: "{{.Env.TARGET_ENV_PREFIX}} cmake --build . --parallel -v"
+ command: "{{.Env.CONFIGURE_ENV_PREFIX}} cmake --build . --parallel -v"
maxTimeInSeconds: "{{.Env.CMAKE_BUILD_TIMEOUT}}"
maxTimeBetweenOutput: "{{.Env.CMAKE_BUILD_OUTPUT_TIMEOUT}}"
userMessageOnFailure: >
diff --git a/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml b/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml
index 77ba36f4c6..9c5595be27 100644
--- a/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml
+++ b/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml
@@ -16,15 +16,21 @@ instructions:
directory: "{{.SourceDir}}/build/host"
- type: ChangeDirectory
directory: "{{.BuildDir}}"
+
+ - 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 the in configure script.
+ variableValue: "{{.Env.CMAKE_ARGS}} {{.Env.COMMON_CMAKE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{unixPathSeparators .InstallDir}}/host"
+ - type: EnvironmentVariable
+ variableName: CONFIGURE_ENV_PREFIX
+ variableValue: "{{.Env.ENV_PREFIX}}"
+ - !include "{{qt/qtbase}}/call_configure_qtbase.yaml"
+
- type: ExecuteCommand
- command: "{{.Env.ENV_PREFIX}} cmake {{.Env.CONFIGURE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}}/host {{.SourceDir}}"
- executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
- maxTimeInSeconds: 6000
- maxTimeBetweenOutput: 1200
- userMessageOnFailure: >
- Failed to call cmake.
- - type: ExecuteCommand
- command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel -v"
+ command: "{{.Env.CONFIGURE_ENV_PREFIX}} cmake --build . --parallel -v"
maxTimeInSeconds: 6000
maxTimeBetweenOutput: 4800
userMessageOnFailure: >
@@ -48,29 +54,36 @@ instructions:
directory: "{{.SourceDir}}/build/target"
- type: ChangeDirectory
directory: "{{.BuildDir}}"
+
- type: AppendToEnvironmentVariable
- variableName: TARGET_CONFIGURE_ARGS
+ variableName: TARGET_CMAKE_ARGS
variableValue: " -DQT_HOST_PATH={{.AgentWorkingDir}}/install"
disable_if:
condition: property
property: platformDependency
equals_value: null
- type: AppendToEnvironmentVariable
- variableName: TARGET_CONFIGURE_ARGS
+ variableName: TARGET_CMAKE_ARGS
variableValue: " -DQT_HOST_PATH={{.InstallDir}}/host"
enable_if:
condition: property
property: platformDependency
equals_value: null
+
+ - type: EnvironmentVariable
+ variableName: COIN_CONFIGURE_ARGS
+ variableValue: "{{.Env.TARGET_CONFIGURE_ARGS}}"
+ - type: EnvironmentVariable
+ variableName: COIN_CMAKE_ARGS
+ # Use unix separators even on Windows, to avoid escaping issues in the configure script.
+ variableValue: "{{.Env.TARGET_CMAKE_ARGS}} {{.Env.COMMON_TARGET_CMAKE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{unixPathSeparators .InstallDir}}/target"
+ - type: EnvironmentVariable
+ variableName: CONFIGURE_ENV_PREFIX
+ variableValue: "{{.Env.TARGET_ENV_PREFIX}}"
+ - !include "{{qt/qtbase}}/call_configure_qtbase.yaml"
+
- type: ExecuteCommand
- command: "{{.Env.TARGET_ENV_PREFIX}} cmake {{.Env.TARGET_CONFIGURE_ARGS}} -DCMAKE_STAGING_PREFIX:PATH={{.InstallDir}}/target {{.SourceDir}}"
- executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
- maxTimeInSeconds: 6000
- maxTimeBetweenOutput: 1200
- userMessageOnFailure: >
- Failed to call cmake.
- - type: ExecuteCommand
- command: "{{.Env.TARGET_ENV_PREFIX}} cmake --build . --parallel -v"
+ command: "{{.Env.CONFIGURE_ENV_PREFIX}} cmake --build . --parallel -v"
maxTimeInSeconds: 6000
maxTimeBetweenOutput: 4800
userMessageOnFailure: >
diff --git a/coin/instructions/cmake_module_build_instructions.yaml b/coin/instructions/cmake_module_build_instructions.yaml
index 8446ad6fbe..8f31e72a0f 100644
--- a/coin/instructions/cmake_module_build_instructions.yaml
+++ b/coin/instructions/cmake_module_build_instructions.yaml
@@ -6,11 +6,18 @@ instructions:
directory: "{{.SourceDir}}"
- type: ChangeDirectory
directory: "{{.BuildDir}}"
+
+ - type: EnvironmentVariable
+ variableName: COIN_CONFIGURE_ARGS
+ variableValue: "{{.Env.NON_QTBASE_CONFIGURE_ARGS}}"
- type: EnvironmentVariable
variableName: COIN_CMAKE_ARGS
- # The lack of space between the non qtbase configure args and the rest of the args is important!
- variableValue: "{{.Env.NON_QTBASE_CONFIGURE_ARGS}} {{.SourceDir}}"
- - !include "{{qt/qtbase}}/call_cmake.yaml"
+ variableValue: "{{.Env.NON_QTBASE_CMAKE_ARGS}} {{.Env.COMMON_NON_QTBASE_CMAKE_ARGS}}"
+ - type: EnvironmentVariable
+ variableName: CONFIGURE_ENV_PREFIX
+ variableValue: "{{.Env.ENV_PREFIX}}"
+ - !include "{{qt/qtbase}}/call_configure_module.yaml"
+
- type: EnvironmentVariable
variableName: CMAKE_BUILD_TIMEOUT
variableValue: "6000"
@@ -26,7 +33,7 @@ instructions:
env_var: CMAKE_BUILD_OUTPUT_TIMEOUT
equals_value: null
- type: ExecuteCommand
- command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel -v"
+ command: "{{.Env.CONFIGURE_ENV_PREFIX}} cmake --build . --parallel -v"
maxTimeInSeconds: "{{.Env.CMAKE_BUILD_TIMEOUT}}"
maxTimeBetweenOutput: "{{.Env.CMAKE_BUILD_OUTPUT_TIMEOUT}}"
userMessageOnFailure: >
diff --git a/coin/instructions/cmake_qtbase_build_instructions.yaml b/coin/instructions/cmake_qtbase_build_instructions.yaml
index f352df1fcd..7048b59d14 100644
--- a/coin/instructions/cmake_qtbase_build_instructions.yaml
+++ b/coin/instructions/cmake_qtbase_build_instructions.yaml
@@ -6,15 +6,21 @@ instructions:
directory: "{{.SourceDir}}"
- type: ChangeDirectory
directory: "{{.BuildDir}}"
+
+ - 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}}"
+ - !include "{{qt/qtbase}}/call_configure_qtbase.yaml"
+
- type: ExecuteCommand
- command: "{{.Env.ENV_PREFIX}} cmake {{.Env.CONFIGURE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}} {{.SourceDir}}"
- executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
- maxTimeInSeconds: 6000
- maxTimeBetweenOutput: 1200
- userMessageOnFailure: >
- Failed to call cmake.
- - type: ExecuteCommand
- command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel -v"
+ command: "{{.Env.CONFIGURE_ENV_PREFIX}} cmake --build . --parallel -v"
maxTimeInSeconds: 6000
maxTimeBetweenOutput: 1200
userMessageOnFailure: >
diff --git a/coin/instructions/coin_module_test_docs.yaml b/coin/instructions/coin_module_test_docs.yaml
index f42b6ae08f..b2ae01677e 100644
--- a/coin/instructions/coin_module_test_docs.yaml
+++ b/coin/instructions/coin_module_test_docs.yaml
@@ -14,10 +14,15 @@ instructions:
command: "cp -rfs /opt/qt-doctools/. {{.InstallDir}}"
userMessageOnFailure: >
Failed to create links to provisioned binaries.
+
- type: EnvironmentVariable
variableName: COIN_CMAKE_ARGS
- variableValue: "-DQT_BUILD_TESTS=OFF {{.SourceDir}}"
- - !include "{{qt/qtbase}}/call_cmake.yaml"
+ variableValue: "-DQT_BUILD_TESTS=OFF"
+ - type: EnvironmentVariable
+ variableName: CONFIGURE_ENV_PREFIX
+ variableValue: "{{.Env.ENV_PREFIX}}"
+ - !include "{{qt/qtbase}}/call_configure_module.yaml"
+
- type: ExecuteCommand
command: "{{.Env.ENV_PREFIX}} cmake --build . --target generate_docs -v"
ignoreExitCode: false
diff --git a/coin/instructions/coin_qtbase_test_docs.yaml b/coin/instructions/coin_qtbase_test_docs.yaml
index 824d8c5677..2498f9b393 100644
--- a/coin/instructions/coin_qtbase_test_docs.yaml
+++ b/coin/instructions/coin_qtbase_test_docs.yaml
@@ -14,13 +14,16 @@ instructions:
command: "cp -rfs /opt/qt-doctools/. {{.InstallDir}}"
userMessageOnFailure: >
Failed to create links to provisioned binaries.
- - type: ExecuteCommand
- command: "{{.Env.ENV_PREFIX}} cmake {{.Env.CONFIGURE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}} -DQT_BUILD_TESTS=OFF {{.SourceDir}}"
- executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
- maxTimeInSeconds: 6000
- maxTimeBetweenOutput: 1200
- userMessageOnFailure: >
- Failed to call cmake.
+
+ - type: EnvironmentVariable
+ variableName: COIN_CMAKE_ARGS
+ # Use unix separators even on Windows, to avoid escaping issues in the configure script.
+ variableValue: "-DQT_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX:PATH={{unixPathSeparators .InstallDir}}"
+ - type: EnvironmentVariable
+ variableName: CONFIGURE_ENV_PREFIX
+ variableValue: "{{.Env.ENV_PREFIX}}"
+ - !include "{{qt/qtbase}}/call_configure_qtbase.yaml"
+
- type: ExecuteCommand
command: "{{.Env.ENV_PREFIX}} cmake --build . --target generate_docs -v"
ignoreExitCode: false
diff --git a/coin/instructions/prepare_building_env.yaml b/coin/instructions/prepare_building_env.yaml
index 1a53597759..7a4ea06fe2 100644
--- a/coin/instructions/prepare_building_env.yaml
+++ b/coin/instructions/prepare_building_env.yaml
@@ -28,14 +28,14 @@ instructions:
- type: Group
instructions:
- type: PrependToEnvironmentVariable
- variableName: CONFIGURE_ARGS
+ variableName: COMMON_CMAKE_ARGS
variableValue: "-DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc "
enable_if:
condition: property
property: host.compiler
contains_value: ICC
- type: PrependToEnvironmentVariable
- variableName: CONFIGURE_ARGS
+ variableName: COMMON_CMAKE_ARGS
variableValue: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ "
enable_if:
condition: or
@@ -47,14 +47,14 @@ instructions:
property: host.compiler
contains_value: Mingw
- type: PrependToEnvironmentVariable
- variableName: CONFIGURE_ARGS
+ variableName: COMMON_CMAKE_ARGS
variableValue: "-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe "
enable_if:
condition: property
property: host.compiler
contains_value: MSVC
- type: PrependToEnvironmentVariable
- variableName: CONFIGURE_ARGS
+ variableName: COMMON_CMAKE_ARGS
variableValue: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ "
enable_if:
condition: property
@@ -64,10 +64,10 @@ instructions:
condition: and
conditions:
- condition: runtime
- env_var: CONFIGURE_ARGS
+ env_var: COMMON_CMAKE_ARGS
contains_value: "-DCMAKE_C_COMPILER="
- condition: runtime
- env_var: CONFIGURE_ARGS
+ env_var: COMMON_CMAKE_ARGS
contains_value: "-DCMAKE_CXX_COMPILER="
@@ -351,7 +351,7 @@ instructions:
- type: Group
instructions:
- type: AppendToEnvironmentVariable
- variableName: CONFIGURE_ARGS
+ variableName: COMMON_CMAKE_ARGS
variableValue: " -DWARNINGS_ARE_ERRORS=ON"
enable_if:
condition: property
@@ -361,46 +361,46 @@ instructions:
- type: Group
instructions:
- type: AppendToEnvironmentVariable
- variableName: CONFIGURE_ARGS
+ variableName: COMMON_CMAKE_ARGS
variableValue: " -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
- type: AppendToEnvironmentVariable
- variableName: NON_QTBASE_CONFIGURE_ARGS
+ variableName: COMMON_NON_QTBASE_CMAKE_ARGS
variableValue: " -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
- type: AppendToEnvironmentVariable
- variableName: TEST_CONFIGURE_ARGS
+ variableName: COMMON_TEST_CMAKE_ARGS
variableValue: " -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
- type: AppendToEnvironmentVariable
- variableName: TARGET_CONFIGURE_ARGS
+ variableName: COMMON_TARGET_CMAKE_ARGS
variableValue: " -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
- type: AppendToEnvironmentVariable
- variableName: NON_QTBASE_TARGET_CONFIGURE_ARGS
+ variableName: COMMON_NON_QTBASE_TARGET_CMAKE_ARGS
variableValue: " -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
- type: AppendToEnvironmentVariable
- variableName: TARGET_TEST_CONFIGURE_ARGS
+ variableName: COMMON_TARGET_TEST_CMAKE_ARGS
variableValue: " -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
# Sccache
- type: Group
instructions:
- type: AppendToEnvironmentVariable
- variableName: CONFIGURE_ARGS
+ variableName: COMMON_CMAKE_ARGS
variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
- type: AppendToEnvironmentVariable
- variableName: NON_QTBASE_CONFIGURE_ARGS
+ variableName: COMMON_NON_QTBASE_CMAKE_ARGS
variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
- type: AppendToEnvironmentVariable
- variableName: TEST_CONFIGURE_ARGS
+ variableName: COMMON_TEST_CMAKE_ARGS
variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
- type: AppendToEnvironmentVariable
- variableName: TARGET_CONFIGURE_ARGS
+ variableName: COMMON_TARGET_CMAKE_ARGS
variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
- type: AppendToEnvironmentVariable
- variableName: NON_QTBASE_TARGET_CONFIGURE_ARGS
+ variableName: COMMON_NON_QTBASE_TARGET_CMAKE_ARGS
variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
- type: AppendToEnvironmentVariable
- variableName: TARGET_TEST_CONFIGURE_ARGS
+ variableName: COMMON_TARGET_TEST_CMAKE_ARGS
variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
enable_if:
condition: property
diff --git a/coin/instructions/prepare_configure_executable.yaml b/coin/instructions/prepare_configure_executable.yaml
new file mode 100644
index 0000000000..e053028237
--- /dev/null
+++ b/coin/instructions/prepare_configure_executable.yaml
@@ -0,0 +1,35 @@
+# 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.
+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"
diff --git a/coin/instructions/prepare_configure_module_executable.yaml b/coin/instructions/prepare_configure_module_executable.yaml
new file mode 100644
index 0000000000..055870e8a6
--- /dev/null
+++ b/coin/instructions/prepare_configure_module_executable.yaml
@@ -0,0 +1,46 @@
+# Call either qt-cmake or qt-configure-module 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.
+type: Group
+instructions:
+ - type: Group
+ enable_if:
+ condition: property
+ property: features
+ contains_value: UseConfigure
+ instructions:
+ - type: EnvironmentVariable
+ variableName: CONFIGURE_EXECUTABLE
+ variableValue: "{{.InstallDir}}{{.Env.INSTALL_DIR_SUFFIX}}/bin/qt-configure-module"
+ disable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
+ - type: EnvironmentVariable
+ variableName: CONFIGURE_EXECUTABLE
+ variableValue: "{{.InstallDir}}{{.Env.INSTALL_DIR_SUFFIX}}\\bin\\qt-configure-module.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: "{{.InstallDir}}{{.Env.INSTALL_DIR_SUFFIX}}/bin/qt-cmake-private"
+ disable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
+ - type: EnvironmentVariable
+ variableName: CONFIGURE_EXECUTABLE
+ variableValue: "{{.InstallDir}}{{.Env.INSTALL_DIR_SUFFIX}}\\bin\\qt-cmake-private.bat"
+ enable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
diff --git a/coin/instructions/prepare_install_dir_suffix_host.yaml b/coin/instructions/prepare_install_dir_suffix_host.yaml
new file mode 100644
index 0000000000..30cf77a6c1
--- /dev/null
+++ b/coin/instructions/prepare_install_dir_suffix_host.yaml
@@ -0,0 +1,16 @@
+type: Group
+instructions:
+ - type: EnvironmentVariable
+ variableName: INSTALL_DIR_SUFFIX
+ variableValue: "/host"
+ disable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
+ - type: EnvironmentVariable
+ variableName: INSTALL_DIR_SUFFIX
+ variableValue: "\\host"
+ enable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
diff --git a/coin/instructions/prepare_install_dir_suffix_target.yaml b/coin/instructions/prepare_install_dir_suffix_target.yaml
new file mode 100644
index 0000000000..e53519430e
--- /dev/null
+++ b/coin/instructions/prepare_install_dir_suffix_target.yaml
@@ -0,0 +1,16 @@
+type: Group
+instructions:
+ - type: EnvironmentVariable
+ variableName: INSTALL_DIR_SUFFIX
+ variableValue: "/target"
+ disable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
+ - type: EnvironmentVariable
+ variableName: INSTALL_DIR_SUFFIX
+ variableValue: "\\target"
+ enable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
diff --git a/coin/instructions/qmake_examples/build_qmake_examples_instructions.yaml b/coin/instructions/qmake_examples/build_qmake_examples_instructions.yaml
index 7b8a6376f9..dc3417a05c 100644
--- a/coin/instructions/qmake_examples/build_qmake_examples_instructions.yaml
+++ b/coin/instructions/qmake_examples/build_qmake_examples_instructions.yaml
@@ -21,3 +21,7 @@ instructions:
- condition: runtime
env_var: COIN_CMAKE_ARGS
contains_value: "QT_BUILD_EXAMPLES=ON"
+ # covers all cases for UseConfigure configs
+ - condition: runtime
+ env_var: COIN_CONFIGURE_ARGS
+ contains_value: "-make examples"