Doc is built unconditionally, every time
Bug #1476488 reported by
Michi Henning
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cmake-extras (Ubuntu) |
Fix Released
|
Undecided
|
Pete Woods |
Bug Description
Using add_doxygen() like this:
file(GLOB public_headers ${CMAKE_
add_doxygen(
${LIBNAME}-doc
INPUT
OUTPUT_
STRIP_FROM_PATH
STRIP_
EXCLUDE_
EXCLUDE_SYMBOLS
*::Priv
ALL
)
With this, the documentation is re-generated every time I build the project, even if Doxyfile.in has not changed, and none of the source files from which the documentation is built have changed.
For large documentation sets, this is quite annoying.
Related branches
lp:~unity-api-team/cmake-extras/fixes-for-michi
- Michi Henning: Pending requested
- CMake Extras: Pending requested
-
Diff: 84 lines (+33/-6)2 files modifieddebian/changelog (+7/-0)
src/UseDoxygen.cmake (+26/-6)
no longer affects: | cmake-extras |
Changed in cmake-extras (Ubuntu): | |
status: | New → Confirmed |
Changed in cmake-extras (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in cmake-extras (Ubuntu): | |
assignee: | nobody → Pete Woods (pete-woods) |
status: | In Progress → Fix Released |
To post a comment you must log in.
Here is how I used to do this previously:
find_package( Doxygen) DOT_EXECUTABLE dot /usr/bin) file(${ PROJECT_ SOURCE_ DIR}/doc/ Doxyfile. in ${PROJECT_ BINARY_ DIR}/doc/ Doxyfile @ONLY IMMEDIATE) custom_ command( OUTPUT ${PROJECT_ BINARY_ DIR}/doc/ lib${LIBNAME} /index. html
COMMAND ${DOXYGEN_ EXECUTABLE} ${PROJECT_ BINARY_ DIR}/doc/ Doxyfile
DEPENDS ${PROJECT_ BINARY_ DIR}/doc/ Doxyfile
${PROJECT_ SOURCE_ DIR}/include/ core/*. h) custom_ target( doc ALL
DEPENDS ${PROJECT_ BINARY_ DIR}/doc/ lib${LIBNAME} /index. html) DIRECTORY ${PROJECT_ BINARY_ DIR}/doc/ lib${LIBNAME}
DESTINATIO N ${CMAKE_ INSTALL_ PREFIX} /share/ doc)
find_program(
if (NOT DOXYGEN_FOUND OR NOT DOT_EXECUTABLE)
message(WARNING "Cannot generate documentation: doxygen and/or graphviz not found")
else()
configure_
add_
add_
install(
endif()
Note that add_custom_command has a depends on the generated Doxyfile and the input files, and add_custom_target doesn't depend on Doxyfile, but on the generated index.html file.