Is your feature request related to a problem? Please describe.
CMinx currently offers two types of installation: One via pip, which effectively only installs the cminx script, and one via CMake, which also installs the CMake modules. If CMinx is used in a downstream project, one can use the cminx_gen_rst function from the installed CMake module to generate the CMake documentation for said project. However, this function works at "configure time", i.e., when CMake is executed. I think this works agains the notion of a "build". Building a documentation is a typical task once configuration of a project is complete. In particular, it's only done on request by the user, to keep configuration as quick as possible.
Describe the solution you'd like
I propose that the function cminx_gen_rst does not run the cminx command immediately but uses add_custom_command or add_custom_target to define a CMake target that then runs cminx. After configuring the project, users can then decide to build the "CMinx target", and are able to use this target as dependency for their typical doc targets.
Describe alternatives you've considered
None.
Additional context
None.
Is your feature request related to a problem? Please describe.
CMinx currently offers two types of installation: One via
pip, which effectively only installs thecminxscript, and one via CMake, which also installs the CMake modules. If CMinx is used in a downstream project, one can use thecminx_gen_rstfunction from the installed CMake module to generate the CMake documentation for said project. However, this function works at "configure time", i.e., when CMake is executed. I think this works agains the notion of a "build". Building a documentation is a typical task once configuration of a project is complete. In particular, it's only done on request by the user, to keep configuration as quick as possible.Describe the solution you'd like
I propose that the function
cminx_gen_rstdoes not run thecminxcommand immediately but usesadd_custom_commandoradd_custom_targetto define a CMake target that then runscminx. After configuring the project, users can then decide to build the "CMinx target", and are able to use this target as dependency for their typicaldoctargets.Describe alternatives you've considered
None.
Additional context
None.