Only add the doc target if doxygen and sphinx-build are available

This commit is contained in:
Victor Zverovich 2015-01-30 12:53:52 -08:00
parent 90bc8dd3ed
commit b4eef59100

View File

@ -1,4 +1,11 @@
foreach (program doxygen sphinx-build)
find_program(${program} ${program})
if (NOT ${program})
message(STATUS "Target 'doc' disabled (requires ${program})")
return ()
endif ()
endforeach ()
add_custom_target(doc
COMMAND doxygen
COMMAND rm -rf html
COMMAND sphinx-build -b html . html)
COMMAND ${doxygen}
COMMAND ${sphinx-build} -b html . html)