CMake: fix Doxygen garbage cleaning
This commit is contained in:
parent
3aa5ae7513
commit
f7533fc93f
|
@ -75,11 +75,16 @@ add_custom_command(
|
||||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
COMMENT "Generating Doxygen-based man pages")
|
COMMENT "Generating Doxygen-based man pages")
|
||||||
|
|
||||||
add_custom_target(doc_doxygen true DEPENDS ${DOXYGEN_MANPAGES})
|
# Target to clean the files generated by Doxygen that we don't want
|
||||||
add_dependencies(doc doc_doxygen)
|
# (so-called "directory references"). This cannot be done with CMake's
|
||||||
|
# file() commands because it has to be run every time the target is
|
||||||
|
# built, and you cannot use CMake functions in a custom target or
|
||||||
|
# command.
|
||||||
|
add_custom_target(clean_doxygen_garbage
|
||||||
|
COMMAND rm -f "${OUTPUT_DIRECTORY}/_*_owlps_libowlps*_.${SECTION}")
|
||||||
|
|
||||||
# Clean Doxygen garbage
|
# Set up the target
|
||||||
file(GLOB DOXYGEN_GARBAGE "${OUTPUT_DIRECTORY}/_*_owlps_libowlps*_.${SECTION}")
|
add_custom_target(doc_doxygen true DEPENDS ${DOXYGEN_MANPAGES})
|
||||||
if (DOXYGEN_GARBAGE)
|
|
||||||
file(REMOVE ${DOXYGEN_GARBAGE})
|
# Add the target to the "doc" meta-target
|
||||||
endif()
|
add_dependencies(doc doc_doxygen clean_doxygen_garbage)
|
||||||
|
|
Loading…
Reference in New Issue