This is an update patch for [1].
(Eg,
Changed "#include <Sema.h>" to #include "include/clang/Sema/Sema.h"
Differential D32113
Add path from clang to doxygen document include header yamaguchi on Apr 15 2017, 6:21 PM. Authored by
Details
This is an update patch for [1]. (Eg,
Diff Detail Event TimelineComment Actions Did you have a look at the attached patch at the bug? We should not show the full path but only say, 'include/clang/Sema/Sema.h'. This would help new users to find easier how to include. Comment Actions Changed absolute path to path from clang source directory. Comment Actions @yamaguchi Did you test the latest revision of this patch and get the desired output paths? I just tested it and it seems on my system doxygen can't handle the @abs_srcdir@/../. At least on my system it gets correctly generated as: STRIP_FROM_PATH = /home/teemperor/llvm/trunk/tools/clang/docs/../ However, because doxygen seems to be only doing string-matching, it doesn't understand that /home/teemperor/llvm/trunk/tools/clang/ equals /home/teemperor/llvm/trunk/tools/clang/docs/../ (at least on my system). If I manually remove docs/../ I get the correct result. In theory we could just replace the @abs_srcdir@/../with another CMake variable that is already correctly replaced by the real path, but I fear we loose autoconf support that way unless we have a separate doxygen-cmake.conf.in or something ugly like that. Comment Actions @teemperor Comment Actions Woops, my bad, seems like I tested just before you fixed it. Because I read in the documentation that we could also pass include paths here, we could also try something like this: STRIP_FROM_INC_PATH = @abs_srcdir@/.. STRIP_FROM_INC_PATH += @abs_srcdir@/../include/clang STRIP_FROM_INC_PATH += @abs_srcdir@/../include/clang-c That way we have the actual compiler include paths in there and we probably get the fully working #includes one has to do for a certain class. Could you test that? Something like #include "Sema/Sema.h" for the Sema class would be IMHO the best solution. Not sure what STRIP_FROM_PATH is doing, but I think we can leave it at it's current value? Otherwise I think this review is ready to go.
Comment Actions Landed in r300825. Maybe we should do something like that for LLVM documentation, too. |
We should be stripping @abs_srcdir@/../include because in reality the way the user will include those files is via `#include "clang/Sema/Sema.h" for instance.