<div dir="ltr">Dear all,<br><br>in our project we have two sets of documentation, which are each their own custom target:<br><br>Framework/Doc/CMakeLists.txt:<br>add_custom_target(FrameworkDoc<br>                  ${DOXYGEN} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf<br>                  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}<br>                  )<br><br>Application/Doc/CMakeLists.txt:                 <br>add_custom_target(doc<br>                  ${DOXYGEN} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf<br>                  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}<br>                  )<br><br>As building the documentation takes quite some time neither is part of the ALL target. With the above configuration building works as expected, each has to be build manually and the build works. However, the doc target needs the .tag file which is generated as part of FrameworkDoc. If I add a dependency:<br>add_custom_target(doc<br>                  ${DOXYGEN} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf<br>                  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}<br>                  DEPENDS FrameworkDoc<br>                  )<br><br>the FrameworkDoc target is being build every time I build the ALL target, instead of only if I build the doc target.<br><br>I this behaviour intentional? Am I missing some option I should be using?<br><br>Any advice is appreciated,<br>Caspar<br></div>