llvm.org GIT mirror llvm / b514395
CMake Xcode builds: symlink tblgen targets out to bin/. Xcode always puts executable targets in the directory bin/<Config>. When building separate LLVM and Clang projects for Xcode, this prevents the CMake-configured project for Clang from finding llvm-tblgen. Add a symlink so that tblgen executables are always available in bin/ (regardless of the configuration LLVM is built with). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189220 91177308-0d34-0410-b5e6-96231b3b80d8 Douglas Gregor 6 years ago
1 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
8484 add_llvm_utility(${target} ${ARGN})
8585 set(LLVM_LINK_COMPONENTS ${${target}_OLD_LLVM_LINK_COMPONENTS})
8686
87 # For Xcode builds, symlink bin/ to bin// so that
88 # a separately-configured Clang project can still find llvm-tblgen.
89 if (XCODE)
90 add_custom_target(${target}-top ALL
91 ${CMAKE_COMMAND} -E create_symlink
92 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}
93 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target}${CMAKE_EXECUTABLE_SUFFIX}
94 DEPENDS ${target})
95 endif ()
96
8797 set(${project}_TABLEGEN "${target}" CACHE
8898 STRING "Native TableGen executable. Saves building one when cross-compiling.")
8999