smeenai created this revision. smeenai added reviewers: beanz, phosek. Herald added subscribers: jdoerfert, arphaman, mgorny. Herald added a project: clang.
r344555 switched LLVM to guarding install targets with LLVM_ENABLE_IDE instead of CMAKE_CONFIGURATION_TYPES, which expresses the intent more directly and can be overridden by a user. Make the corresponding change in clang. LLVM_ENABLE_IDE is computed by HandleLLVMOptions, so it should be available for both standalone and integrated builds. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D58284 Files: clang/CMakeLists.txt clang/cmake/modules/AddClang.cmake clang/lib/Headers/CMakeLists.txt clang/tools/c-index-test/CMakeLists.txt clang/tools/diagtool/CMakeLists.txt clang/tools/libclang/CMakeLists.txt
Index: clang/tools/libclang/CMakeLists.txt =================================================================== --- clang/tools/libclang/CMakeLists.txt +++ clang/tools/libclang/CMakeLists.txt @@ -149,7 +149,7 @@ add_custom_target(libclang-headers) set_target_properties(libclang-headers PROPERTIES FOLDER "Misc") -if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's. +if (NOT LLVM_ENABLE_IDE) add_llvm_install_targets(install-libclang-headers COMPONENT libclang-headers) endif() @@ -165,7 +165,7 @@ DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages") endforeach() -if(NOT CMAKE_CONFIGURATION_TYPES) +if(NOT LLVM_ENABLE_IDE) add_custom_target(libclang-python-bindings) add_llvm_install_targets(install-libclang-python-bindings COMPONENT Index: clang/tools/diagtool/CMakeLists.txt =================================================================== --- clang/tools/diagtool/CMakeLists.txt +++ clang/tools/diagtool/CMakeLists.txt @@ -23,7 +23,7 @@ COMPONENT diagtool RUNTIME DESTINATION bin) - if (NOT CMAKE_CONFIGURATION_TYPES) + if (NOT LLVM_ENABLE_IDE) add_llvm_install_targets(install-diagtool DEPENDS diagtool COMPONENT diagtool) Index: clang/tools/c-index-test/CMakeLists.txt =================================================================== --- clang/tools/c-index-test/CMakeLists.txt +++ clang/tools/c-index-test/CMakeLists.txt @@ -61,7 +61,7 @@ RUNTIME DESTINATION "${INSTALL_DESTINATION}" COMPONENT c-index-test) - if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's. + if (NOT LLVM_ENABLE_IDE) add_llvm_install_targets(install-c-index-test DEPENDS c-index-test COMPONENT c-index-test) Index: clang/lib/Headers/CMakeLists.txt =================================================================== --- clang/lib/Headers/CMakeLists.txt +++ clang/lib/Headers/CMakeLists.txt @@ -178,7 +178,7 @@ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include/cuda_wrappers) -if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's. +if (NOT LLVM_ENABLE_IDE) add_llvm_install_targets(install-clang-headers DEPENDS clang-headers COMPONENT clang-headers) Index: clang/cmake/modules/AddClang.cmake =================================================================== --- clang/cmake/modules/AddClang.cmake +++ clang/cmake/modules/AddClang.cmake @@ -103,7 +103,7 @@ ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} RUNTIME DESTINATION bin) - if (NOT CMAKE_CONFIGURATION_TYPES) + if (NOT LLVM_ENABLE_IDE) add_llvm_install_targets(install-${name} DEPENDS ${name} COMPONENT ${name}) @@ -147,7 +147,7 @@ RUNTIME DESTINATION bin COMPONENT ${name}) - if(NOT CMAKE_CONFIGURATION_TYPES) + if(NOT LLVM_ENABLE_IDE) add_llvm_install_targets(install-${name} DEPENDS ${name} COMPONENT ${name}) Index: clang/CMakeLists.txt =================================================================== --- clang/CMakeLists.txt +++ clang/CMakeLists.txt @@ -547,7 +547,7 @@ add_custom_target(clang-libraries) set_target_properties(clang-libraries PROPERTIES FOLDER "Misc") -if(NOT CMAKE_CONFIGURATION_TYPES) +if(NOT LLVM_ENABLE_IDE) add_llvm_install_targets(install-clang-libraries DEPENDS clang-libraries COMPONENT clang-libraries) @@ -558,7 +558,7 @@ list(REMOVE_DUPLICATES CLANG_LIBS) foreach(lib ${CLANG_LIBS}) add_dependencies(clang-libraries ${lib}) - if(NOT CMAKE_CONFIGURATION_TYPES) + if(NOT LLVM_ENABLE_IDE) add_dependencies(install-clang-libraries install-${lib}) endif() endforeach()
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits