diff options
Diffstat (limited to 'Utilities/CMakeLists.txt')
-rw-r--r-- | Utilities/CMakeLists.txt | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt index 22a3d5a7fa..2a8c8553d6 100644 --- a/Utilities/CMakeLists.txt +++ b/Utilities/CMakeLists.txt @@ -3,23 +3,10 @@ subdirs(Doxygen) -if(CMAKE_DOC_TARBALL) - # Undocumented option to extract and install pre-built documentation. - # This is intended for use during packaging of CMake itself. - if(CMAKE_DOC_TARBALL MATCHES "/([^/]+)\\.tar\\.gz$") - set(dir "${CMAKE_MATCH_1}") - else() - message(FATAL_ERROR "CMAKE_DOC_TARBALL must end in .tar.gz") - endif() - add_custom_command( - OUTPUT ${dir}.stamp - COMMAND cmake -E rm -rf ${dir} - COMMAND cmake -E tar xf ${CMAKE_DOC_TARBALL} - COMMAND cmake -E touch ${dir}.stamp - DEPENDS ${CMAKE_DOC_TARBALL} - ) - add_custom_target(documentation ALL DEPENDS ${dir}.stamp) - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${dir}/ +if (CMake_DOC_ARTIFACT_PREFIX) + # Undocumented option for CI usage to reuse already + # built documentation. + install(DIRECTORY ${CMake_DOC_ARTIFACT_PREFIX}/ DESTINATION . USE_SOURCE_PERMISSIONS) else() # Normal documentation build. |