From fc3ac85db948794060f7c3d614376018c2a9e9ac Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 21 May 2024 13:14:39 +0200 Subject: [PATCH] coin: Add instructions for generating an SBOM when installing Qt The instructions will only run if a coin platform config has the 'GenerateSBOM' feature. The -sbom configure option is not sticky across repos, similar to -headersclean, so that if a user wants to build another qt repo against a prebuilt qt, it won't try to generate the sbom automatically. That's why we append -sbom to all the repos configure args, and not just the qtbase one. Task-number: QTBUG-122899 Change-Id: Ice91cbc430826838119ce3085cbd52c0909f2746 Reviewed-by: Alexey Edelev (cherry picked from commit d940399b3e6e9403f94190ffc71a5f5db68f51f3) Reviewed-by: Qt Cherry-pick Bot --- coin/instructions/prepare_building_env.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/coin/instructions/prepare_building_env.yaml b/coin/instructions/prepare_building_env.yaml index a3ac5c3f0b8..373a2ea1153 100644 --- a/coin/instructions/prepare_building_env.yaml +++ b/coin/instructions/prepare_building_env.yaml @@ -473,6 +473,26 @@ instructions: property: features contains_value: UseConfigure + # SBOM + - type: Group + enable_if: + condition: property + property: features + contains_value: GenerateSBOM + instructions: + - type: AppendToEnvironmentVariable + variableName: COMMON_CMAKE_ARGS + variableValue: " -DQT_GENERATE_SBOM=ON" + - type: AppendToEnvironmentVariable + variableName: COMMON_NON_QTBASE_CMAKE_ARGS + variableValue: " -DQT_GENERATE_SBOM=ON" + - type: AppendToEnvironmentVariable + variableName: COMMON_TARGET_CMAKE_ARGS + variableValue: " -DQT_GENERATE_SBOM=ON" + - type: AppendToEnvironmentVariable + variableName: COMMON_NON_QTBASE_TARGET_CMAKE_ARGS + variableValue: " -DQT_GENERATE_SBOM=ON" + - type: Group instructions: - type: AppendToEnvironmentVariable