Hello,
I often found the need to store the parameters passed to a command in a variable.
e.g. the options of find_package, so they can be exported into the find-module definition.
It would be nice if these instances could be marked as such:
e.g.:
set(boost_find_package_args Boost 1.81 REQUIRED CONFIG
COMPONENTS
chrono
date_time
filesystem
)
find_package($(boost_find_package_args})
export_dependency("Boost" $(boost_find_package_args})
It would be nice to annotate the set command with the information that the parameters are used as parameters of a find_package.
e.g.:
# gersemi: format-as=find_package[offset=1] # offset=1 to skip `boost_find_package_args`
set(boost_find_package_args Boost 1.81 REQUIRED CONFIG
COMPONENTS
chrono
date_time
filesystem
)
find_package($(boost_find_package_args})
export_dependency("Boost" $(boost_find_package_args})
Similar ideas have also been thought of in cmake-format:
https://cmake-format.readthedocs.io/en/latest/format-case_studies.html#set
Hello,
I often found the need to store the parameters passed to a command in a variable.
e.g. the options of
find_package, so they can be exported into the find-module definition.It would be nice if these instances could be marked as such:
e.g.:
It would be nice to annotate the
setcommand with the information that the parameters are used as parameters of a find_package.e.g.:
Similar ideas have also been thought of in
cmake-format:https://cmake-format.readthedocs.io/en/latest/format-case_studies.html#set