This is an archive of the discontinued LLVM Phabricator instance.

Changed llvm/CMakeLists.txt and added relative path to llvm doxygen
ClosedPublic

Authored by yamaguchi on Apr 21 2017, 1:43 AM.

Details

Summary

Fist part is to change CMakeLists.txt and doxygen.cfg.in by following reasons:
In llvm/docs/CmakeLists.txt, it was

  • set(abs_top_srcdir ${LLVM_MAIN_SRC_DIR})
  • set(abs_top_builddir ${LLVM_BINARY_DIR})

However, ${LLVM_MAIN_SRC_DIR} is not an environmental variable but just a normal local PATH, which is substituted by llvm/CmakeLists.txt as follows:

297 set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR} ) # --src-root
298 set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR}/include ) # --includedir
299 set(LLVM_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} ) # --prefix

In clang/docs/CmakeLists.txt, ${CMAKE_CURRENT_FOO_DIR} is used, so it is good to follow its way.

Also, I added README.txt how to generate llvm doxygen.

Second part is to change #include <Foo.h> to #include "Foo/Foo.h" as we did in clang [1].
It will change #include <jitprofiling.h> to #include "ExecutionEngine/IntelJITEvents/jitprofiling.h"

[1]
https://reviews.llvm.org/D32113

Diff Detail

Event Timeline

yamaguchi created this revision.Apr 21 2017, 1:43 AM
teemperor edited edge metadata.Apr 21 2017, 4:52 AM

I think most of the changes are just necessary because we replaced LLVM_MAIN_SRC_DIR with CMAKE_SOURCE_DIR (all the added ../ and removed docs). On the other hand this is now in sync with the way the the clang doxygen.cfg is structured and it fixes the include paths, so I think this looks reasonable.

docs/README.txt
61

cmake cmake => cmake and I guess -DDOXYGEN_FOUND =>-DLLVM_ENABLE_DOXYGEN=On.

And we really need documentation for building this. The only search results I find for this are instructions for the pre-CMake era.

Anyway, the intended way is (at least from what I can see) to just run:

cmake -DLLVM_ENABLE_DOXYGEN=On <src-dir>
make doxygen-llvm # for LLVM docs
make doxygen-clang # for clang docs

instead of invoking doxygen by yourself. Could you change this?

yamaguchi updated this revision to Diff 96124.Apr 21 2017, 6:12 AM
yamaguchi retitled this revision from Fixed llvm/CMakeLists.txt which doesn't generate proper MakeFiles and added relative path to llvm doxygen to Changed llvm/CMakeLists.txt and added relative path to llvm doxygen.

Edit README.txt.

yamaguchi edited the summary of this revision. (Show Details)Apr 21 2017, 6:18 AM
yamaguchi updated this revision to Diff 96128.Apr 21 2017, 6:26 AM

Modified README.txt.
I thought its good to specify where the html is.

This revision is now accepted and ready to land.Apr 26 2017, 11:41 AM
v.g.vassilev closed this revision.Apr 27 2017, 10:36 AM

Landed in r301569.