[llvm] r373482 - [llvm] [cmake] Add install targets for missing distribution components
Michal Gorny via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 2 09:06:50 PDT 2019
Author: mgorny
Date: Wed Oct 2 09:06:50 2019
New Revision: 373482
URL: http://llvm.org/viewvc/llvm-project?rev=373482&view=rev
Log:
[llvm] [cmake] Add install targets for missing distribution components
Add install targets as necessary to include all files normally installed
in LLVM_DISTRIBUTION_COMPONENTS. This includes targets for Sphinx docs,
opt-viewer Python modules and TableGens.
Differential Revision: https://reviews.llvm.org/D68339
Modified:
llvm/trunk/cmake/modules/AddSphinxTarget.cmake
llvm/trunk/cmake/modules/TableGen.cmake
llvm/trunk/tools/opt-viewer/CMakeLists.txt
Modified: llvm/trunk/cmake/modules/AddSphinxTarget.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddSphinxTarget.cmake?rev=373482&r1=373481&r2=373482&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddSphinxTarget.cmake (original)
+++ llvm/trunk/cmake/modules/AddSphinxTarget.cmake Wed Oct 2 09:06:50 2019
@@ -71,6 +71,11 @@ function (add_sphinx_target builder proj
COMPONENT "${project}-sphinx-man"
DESTINATION ${INSTALL_MANDIR}man1)
+ if(NOT LLVM_ENABLE_IDE)
+ add_llvm_install_targets("install-${SPHINX_TARGET_NAME}"
+ DEPENDS ${SPHINX_TARGET_NAME}
+ COMPONENT "${project}-sphinx-man")
+ endif()
elseif (builder STREQUAL html)
string(TOUPPER "${project}" project_upper)
set(${project_upper}_INSTALL_SPHINX_HTML_DIR "share/doc/${project}/html"
@@ -82,6 +87,12 @@ function (add_sphinx_target builder proj
install(DIRECTORY "${SPHINX_BUILD_DIR}/."
COMPONENT "${project}-sphinx-html"
DESTINATION "${${project_upper}_INSTALL_SPHINX_HTML_DIR}")
+
+ if(NOT LLVM_ENABLE_IDE)
+ add_llvm_install_targets("install-${SPHINX_TARGET_NAME}"
+ DEPENDS ${SPHINX_TARGET_NAME}
+ COMPONENT "${project}-sphinx-html")
+ endif()
else()
message(WARNING Installation of ${builder} not supported)
endif()
Modified: llvm/trunk/cmake/modules/TableGen.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/TableGen.cmake?rev=373482&r1=373481&r2=373482&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/TableGen.cmake (original)
+++ llvm/trunk/cmake/modules/TableGen.cmake Wed Oct 2 09:06:50 2019
@@ -171,7 +171,13 @@ macro(add_tablegen target project)
install(TARGETS ${target}
${export_to_llvmexports}
+ COMPONENT ${target}
RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR})
+ if(NOT LLVM_ENABLE_IDE)
+ add_llvm_install_targets("install-${target}"
+ DEPENDS ${target}
+ COMPONENT ${target})
+ endif()
endif()
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target})
endmacro()
Modified: llvm/trunk/tools/opt-viewer/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt-viewer/CMakeLists.txt?rev=373482&r1=373481&r2=373482&view=diff
==============================================================================
--- llvm/trunk/tools/opt-viewer/CMakeLists.txt (original)
+++ llvm/trunk/tools/opt-viewer/CMakeLists.txt Wed Oct 2 09:06:50 2019
@@ -11,3 +11,10 @@ foreach (file ${files})
DESTINATION share/opt-viewer
COMPONENT opt-viewer)
endforeach (file)
+
+add_custom_target(opt-viewer DEPENDS ${files})
+if(NOT LLVM_ENABLE_IDE)
+ add_llvm_install_targets("install-opt-viewer"
+ DEPENDS opt-viewer
+ COMPONENT opt-viewer)
+endif()
More information about the llvm-commits
mailing list