This revision was automatically updated to reflect the committed changes. Closed by commit rC354141: [clang] Add build and install targets for clang libraries (authored by smeenai, committed by ).
Changed prior to commit: https://reviews.llvm.org/D58269?vs=186957&id=187019#toc Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58269/new/ https://reviews.llvm.org/D58269 Files: CMakeLists.txt cmake/modules/AddClang.cmake Index: cmake/modules/AddClang.cmake =================================================================== --- cmake/modules/AddClang.cmake +++ cmake/modules/AddClang.cmake @@ -108,6 +108,8 @@ DEPENDS ${name} COMPONENT ${name}) endif() + + set_property(GLOBAL APPEND PROPERTY CLANG_LIBS ${name}) endif() set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name}) else() Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -543,6 +543,27 @@ add_subdirectory(docs) endif() +# Custom target to install all clang libraries. +add_custom_target(clang-libraries) +set_target_properties(clang-libraries PROPERTIES FOLDER "Misc") + +if(NOT CMAKE_CONFIGURATION_TYPES) + add_llvm_install_targets(install-clang-libraries + DEPENDS clang-libraries + COMPONENT clang-libraries) +endif() + +get_property(CLANG_LIBS GLOBAL PROPERTY CLANG_LIBS) +if(CLANG_LIBS) + list(REMOVE_DUPLICATES CLANG_LIBS) + foreach(lib ${CLANG_LIBS}) + add_dependencies(clang-libraries ${lib}) + if(NOT CMAKE_CONFIGURATION_TYPES) + add_dependencies(install-clang-libraries install-${lib}) + endif() + endforeach() +endif() + add_subdirectory(cmake/modules) if(CLANG_STAGE)
Index: cmake/modules/AddClang.cmake =================================================================== --- cmake/modules/AddClang.cmake +++ cmake/modules/AddClang.cmake @@ -108,6 +108,8 @@ DEPENDS ${name} COMPONENT ${name}) endif() + + set_property(GLOBAL APPEND PROPERTY CLANG_LIBS ${name}) endif() set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name}) else() Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -543,6 +543,27 @@ add_subdirectory(docs) endif() +# Custom target to install all clang libraries. +add_custom_target(clang-libraries) +set_target_properties(clang-libraries PROPERTIES FOLDER "Misc") + +if(NOT CMAKE_CONFIGURATION_TYPES) + add_llvm_install_targets(install-clang-libraries + DEPENDS clang-libraries + COMPONENT clang-libraries) +endif() + +get_property(CLANG_LIBS GLOBAL PROPERTY CLANG_LIBS) +if(CLANG_LIBS) + list(REMOVE_DUPLICATES CLANG_LIBS) + foreach(lib ${CLANG_LIBS}) + add_dependencies(clang-libraries ${lib}) + if(NOT CMAKE_CONFIGURATION_TYPES) + add_dependencies(install-clang-libraries install-${lib}) + endif() + endforeach() +endif() + add_subdirectory(cmake/modules) if(CLANG_STAGE)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits