Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#49448 - [doxygen] add -Duse-libclang:BOOL=ON to libclang parsing for C++ projects
Attached to Project:
Arch Linux
Opened by Antoine Poliakov (antoinep92) - Monday, 23 May 2016, 14:29 GMT
Last edited by Eli Schwartz (eschwartz) - Friday, 27 July 2018, 16:55 GMT
Opened by Antoine Poliakov (antoinep92) - Monday, 23 May 2016, 14:29 GMT
Last edited by Eli Schwartz (eschwartz) - Friday, 27 July 2018, 16:55 GMT
|
DetailsDescription:
Doxygen's C++ parser is fast but not always correct, especially for complex (heavy template usage) or modern (C++14/17) codes. For this purpose, there is an alternative parser based on LLVM's C++ parser used in the clang compiler, libclang. Because of the dependency on libclang, this option is optional on build. Could you please consider adding it by: - adding 'clang' as a dependency to doxygen - appending '-Duse_libclang:BOOL=ON' to cmake arguments I know this adds a heavy dependency, but the parsing quality for C++ code is really better with this. By the way, I noticed 2 minor unrelated issues in the PKGBUILD (probably not worth a specific bugreport): (1) the current CMake invocation includes '-DQT_QMAKE_EXECUTABLE:FILE=/usr/lib/qt4/bin/qmake' which seems to be obsolete: CMake Warning: Manually-specified variables were not used by the project: QT_QMAKE_EXECUTABLE => I think this line can be removed (2) the dev-dependencies include flex which is already in base-devel, so I think it's not necessary (but does no harm). Additional info: * package version(s): 1.8.11-4 * config and/or log files etc. Steps to reproduce: set CLANG_ASSISTED_PARSING=yes in a Doxyfile and run doxygen yields: warning: Tag `CLANG_ASSISTED_PARSING' at line ---- of file `Doxyfile' belongs to an option that was not enabled at compile time. |
This task depends upon
set(CLANG_LIBS libclang clangTooling ${llvm_libs})
to
set(CLANG_LIBS libclang clangTooling LLVM)
add to the make_depends 'clang' 'llvm' and the mentioned option to cmake
• The “llvm” package must be installed.
• There are 14 “CMakeLists.txt” files in the Doxygen source directory. As “loqs” pointed out, the one to modify is in the /src subdirectory. The change to be made is as described by “loqs”; however the relevant line number is no longer at 238. A search for
“set(CLANG_LIBS libclang clangTooling ${llvm_libs})” will find the correct line to modify.
• Once that change has been made, the instructions to build that worked for me are:
cd <doxygenSourceCodeDirectory>
mkdir build
cd build
cmake -Duse_libclang=ON -G "Unix Makefiles" ..
make
sudo make install