CMake: Move generic PURL function from qt-specific file to main one
Move generic PURL function from qt-specific file to main one. It was mistakenly added to the wrong file during the initial split. Amends f1ac316191c010b1389f6f3549c9f0b4424b9936 Pick-to: 6.8 Task-number: QTBUG-122899 Change-Id: I1884f53ee7d30a25b873d85ee04b8c8d1e0532f5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit fd622bc3ae90ba27069744bf61524139f1642872) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
a70a4f65fe
commit
2d51fc3c69
@ -11,6 +11,34 @@ macro(_qt_internal_sbom_parse_purl_variant_options prefix arguments_var_name)
|
||||
_qt_internal_validate_all_args_are_parsed(arg)
|
||||
endmacro()
|
||||
|
||||
# Helper macro to prepare forwarding all set purl options to some other function.
|
||||
# Expects the options names to be set in the parent scope by calling
|
||||
# _qt_internal_get_sbom_add_target_options(opt_args single_args multi_args)
|
||||
macro(_qt_internal_sbom_forward_purl_handling_options args_var_name)
|
||||
if(NOT opt_args)
|
||||
message(FATAL_ERROR
|
||||
"Expected opt_args to be set by _qt_internal_get_sbom_purl_handling_options")
|
||||
endif()
|
||||
if(NOT single_args)
|
||||
message(FATAL_ERROR
|
||||
"Expected single_args to be set by _qt_internal_get_sbom_purl_handling_options")
|
||||
endif()
|
||||
if(NOT multi_args)
|
||||
message(FATAL_ERROR
|
||||
"Expected multi_args to be set by _qt_internal_get_sbom_purl_handling_options")
|
||||
endif()
|
||||
_qt_internal_forward_function_args(
|
||||
FORWARD_PREFIX arg
|
||||
FORWARD_OUT_VAR ${args_var_name}
|
||||
FORWARD_OPTIONS
|
||||
${opt_args}
|
||||
FORWARD_SINGLE
|
||||
${single_args}
|
||||
FORWARD_MULTI
|
||||
${multi_args}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
# Handles purl arguments specified to functions like qt_internal_add_sbom.
|
||||
# Currently accepts arguments for 3 variants of purls, each of which will generate a separate purl.
|
||||
# If no arguments are specified, for qt entity types, default values will be chosen.
|
||||
|
@ -203,34 +203,6 @@ function(_qt_internal_sbom_handle_qt_entity_cpe target)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Helper macro to prepare forwarding all set purl options to some other function.
|
||||
# Expects the options names to be set in the parent scope by calling
|
||||
# _qt_internal_get_sbom_add_target_options(opt_args single_args multi_args)
|
||||
macro(_qt_internal_sbom_forward_purl_handling_options args_var_name)
|
||||
if(NOT opt_args)
|
||||
message(FATAL_ERROR
|
||||
"Expected opt_args to be set by _qt_internal_get_sbom_purl_handling_options")
|
||||
endif()
|
||||
if(NOT single_args)
|
||||
message(FATAL_ERROR
|
||||
"Expected single_args to be set by _qt_internal_get_sbom_purl_handling_options")
|
||||
endif()
|
||||
if(NOT multi_args)
|
||||
message(FATAL_ERROR
|
||||
"Expected multi_args to be set by _qt_internal_get_sbom_purl_handling_options")
|
||||
endif()
|
||||
_qt_internal_forward_function_args(
|
||||
FORWARD_PREFIX arg
|
||||
FORWARD_OUT_VAR ${args_var_name}
|
||||
FORWARD_OPTIONS
|
||||
${opt_args}
|
||||
FORWARD_SINGLE
|
||||
${single_args}
|
||||
FORWARD_MULTI
|
||||
${multi_args}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
# Returns a vcs url where for purls where qt entities of the current repo are hosted.
|
||||
function(_qt_internal_sbom_get_qt_entity_vcs_url target)
|
||||
set(opt_args "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user