llvm.org GIT mirror llvm / ccc43fc
[CMake] [Xcode] Improving Xcode toolchain generation to support distribution targets This adds a new target `install-distribution-toolchain` which will install an Xcode toolchain featuring just the LLVM components specified in LLVM_DISTRIBUTION_COMPONENTS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268125 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Bieneman 3 years ago
1 changed file(s) with 20 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
6969 -DCMAKE_INSTALL_PREFIX=${LLVMToolchainDir}/usr/
7070 -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
7171 ${cmake_3_2_USES_TERMINAL})
72
73 if(LLVM_DISTRIBUTION_COMPONENTS)
74 if(CMAKE_CONFIGURATION_TYPES)
75 message(FATAL_ERROR "LLVM_DISTRIBUTION_COMPONENTS cannot be specified with multi-configuration generators (i.e. Xcode or Visual Studio)")
76 endif()
77
78 add_custom_target(install-distribution-toolchain
79 DEPENDS ${LLVMToolchainDir}/ToolchainInfo.plist distribution)
80
81 foreach(target ${LLVM_DISTRIBUTION_COMPONENTS})
82 add_custom_target(install-distribution-${target}
83 DEPENDS ${target}
84 COMMAND "${CMAKE_COMMAND}"
85 -DCMAKE_INSTALL_COMPONENT=${target}
86 -DCMAKE_INSTALL_PREFIX=${LLVMToolchainDir}/usr/
87 -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
88 ${cmake_3_2_USES_TERMINAL})
89 add_dependencies(install-distribution-toolchain install-distribution-${target})
90 endforeach()
91 endif()