Debian Codegraph @

coin/instructions/qmake_examples/build_qmake_examples_inner_instructions.yaml

raw
1 type: Group
2 instructions:
3 - type: Group
4 instructions:
5 # Prepare directories to build examples with qmake.
6 - type: ChangeDirectory
7 directory: "{{.SourceDir}}"
8 - type: MakeDirectory
9 directory: "{{.SourceDir}}_qmake/examples"
10 - type: SetBuildDirectory
11 directory: "{{.SourceDir}}_qmake/examples"
12 - type: ChangeDirectory
13 directory: "{{.BuildDir}}"
14 - !include "{{qt/qtbase}}/qmake_examples/get_examples_source_location.yaml"
15
16 # Setup qemu cross-compiled qmake to work.
17 - !include "{{qt/qtbase}}/coin_module_test_qemu_env_vars.yaml"
18
19 # Set either host or target env prefix for qmake and make depending on
20 # tested configuration.
21 - type: Group
22 instructions:
23 - type: EnvironmentVariable
24 variableName: CALL_MAKE_ENV_PREFIX
25 variableValue: "{{.Env.ENV_PREFIX}}"
26 enable_if:
27 condition: runtime
28 env_var: COIN_CONFIG_TYPE
29 equals_value: "Host"
30 - type: EnvironmentVariable
31 variableName: CALL_MAKE_ENV_PREFIX
32 variableValue: "{{.Env.TARGET_ENV_PREFIX}}"
33 enable_if:
34 condition: runtime
35 env_var: COIN_CONFIG_TYPE
36 equals_value: "Target"
37
38 # Ensure that we have an examples/examples.pro file.
39 # If it doesn't exist, write a dummy project file.
40 # The CMake that does this is installed to INSTALL_LIBEXEC, which defaults to "bin" on Windows.
41 - type: ExecuteCommand
42 enable_if:
43 condition: property
44 property: host.os
45 equals_value: Windows
46 command: "cmake --trace-expand -DPRO_FILE={{.SourceDir}}\\examples\\examples.pro -P {{.InstallDir}}\\bin\\ensure_pro_file.cmake"
47 maxTimeInSeconds: 20
48 maxTimeBetweenOutput: 20
49 userMessageOnFailure: >
50 Failed to run cmake -P ensure_pro_file.cmake
51 - type: ExecuteCommand
52 disable_if:
53 condition: property
54 property: host.os
55 equals_value: Windows
56 command: "cmake --trace-expand -DPRO_FILE={{.SourceDir}}/examples/examples.pro -P {{.InstallDir}}/libexec/ensure_pro_file.cmake"
57 maxTimeInSeconds: 20
58 maxTimeBetweenOutput: 20
59 userMessageOnFailure: >
60 Failed to run cmake -P ensure_pro_file.cmake
61
62 - type: EnvironmentVariable
63 variableName: QMAKE_ARGS
64 variableValue: ""
65 - type: Group
66 instructions:
67 - type: AppendToEnvironmentVariable
68 variableName: QMAKE_ARGS
69 variableValue: "CONFIG+=ccache QMAKE_CACHE_LAUNCHER_PREFIX=sccache"
70 enable_if:
71 condition: property
72 property: features
73 contains_value: Sccache
74
75 # Run qmake to configure the examples. The env prefix is important for qemu.
76 - type: ExecuteCommand
77 command: "{{.Env.CALL_MAKE_ENV_PREFIX}} {{.Env.COIN_QMAKE_LOCATION}} {{.Env.COIN_EXAMPLES_SOURCE_LOCATION}} {{.Env.QMAKE_ARGS}}"
78 executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
79 maxTimeInSeconds: 6000
80 maxTimeBetweenOutput: 1200
81 userMessageOnFailure: >
82 Failed to run qmake to build examples.
83
84 # Run make to build the examples.
85 - !include "{{qt/qtbase}}/qmake/call_make.yaml"