hello. is there a way to define a hyperlink target in one document and reference it from another, without knowing the path and filename?
i want to refer to e.g. the documentation of "the function X" without knowing where it's documented.
sdough
maelcum: Sort of - assuming Python, :meth:`method name`, where the method name may have to be qualified with what module / class it's in.
So you don't have to know the file, but you do have to know how to unambiguously specify it within the project.
maelcum
well, it's actually a cmake build system :)
sdough: still sounds good though
well, there'd need to be some way to define such artifacts with unique names
sdough
I haven't worked with sphinx cmake support.
maelcum
i'm using a modified version of cmake's own documentation, which does a lot through file names and well known paths. it's complicated and not flexible.
afaik there isn't any, really. cmake's system uses .rst files and python to extract documentation from cmake files.
sdough
It doesn't look like there is. I think the name for what you're looking for is a "cross-reference target."
As in, you want the function to be a target, and cross-reference it elsewhere.
Could you point me to the docs in question? Context would help.
cmake module documentation works through .rst files in well-known paths that include the cmake module files in a way that extracts the documentation...
it's pretty awful really :)
sdough
I'm not all that surprised - CMake seems constrained by a lot of legacy.
Oh boy. Monkey patching.
maelcum
not really, it's just got a bad language. the build system itself is mostly fine.
maelcum: Did you get things working the way you wanted?
maelcum
i was doing something else in the meantime, but i'll get to it in the next few days or so. you can assume that it worked unless i come back and ask more questions.
sdough
Alright, I hope it goes well.
maelcum
i hope to avoid building (or adapting) the kind of rube goldberg machine that cmake uses for documentation...
why is a python function called "function" when defining it and "func" when referencing it? would their names clash somehow because they are in the same namespace but different?