CMake: Avoid warnings _qt_internal_sbom_replace_qa_placeholders
We should only pass the VERSION option if we have a value to pass. Fixes warnings like the one below when using CMake 3.31: CMake Warning (dev) at cmake/QtPublicSbomAttributionHelpers.cmake:511 (cmake_parse_arguments): The VERSION keyword was followed by an empty string or no value at all. Policy CMP0174 is not set, so cmake_parse_arguments() will unset the arg_VERSION variable rather than setting it to an empty string. Call Stack (most recent call first): cmake/QtPublicSbomHelpers.cmake:954 (_qt_internal_sbom_replace_qa_placeholders) Amends bc3bbb51b7b48d3c4a44a432441938863582242c Pick-to: 6.8 Task-number: QTBUG-122899 Change-Id: I671a9153d72b21b6aed2112bea45f577a5cee4eb Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 4174f388e6804fb138f625aab3eb75b90c2c7bd4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
5581c62922
commit
9491249fc6
@ -900,9 +900,13 @@ function(_qt_internal_sbom_add_target target)
|
||||
endif()
|
||||
|
||||
if(arg_USE_ATTRIBUTION_FILES AND qa_cpes)
|
||||
set(placeholder_args "")
|
||||
if(package_version)
|
||||
list(APPEND placeholder_args VERSION "${package_version}")
|
||||
endif()
|
||||
_qt_internal_sbom_replace_qa_placeholders(
|
||||
VALUES ${qa_cpes}
|
||||
VERSION "${package_version}"
|
||||
${placeholder_args}
|
||||
OUT_VAR qa_cpes_replaced
|
||||
)
|
||||
list(APPEND cpe_values "${qa_cpes_replaced}")
|
||||
@ -951,9 +955,13 @@ function(_qt_internal_sbom_add_target target)
|
||||
endif()
|
||||
|
||||
if(arg_USE_ATTRIBUTION_FILES AND qa_purls)
|
||||
set(placeholder_args "")
|
||||
if(package_version)
|
||||
list(APPEND placeholder_args VERSION "${package_version}")
|
||||
endif()
|
||||
_qt_internal_sbom_replace_qa_placeholders(
|
||||
VALUES ${qa_purls}
|
||||
VERSION "${package_version}"
|
||||
${placeholder_args}
|
||||
OUT_VAR qa_purls_replaced
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user