From: Chris Bieneman Date: Tue, 4 Oct 2016 17:44:28 +0000 (+0000) Subject: [CMake] Exclude intrinsics_gen from LLVM_COMMON_DEPENDS in LLVMConfig.cmake X-Git-Tag: llvmorg-4.0.0-rc1~8135 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6816973723590ece2b7e77f4b3c9c14153fb4bc8;p=platform%2Fupstream%2Fllvm.git [CMake] Exclude intrinsics_gen from LLVM_COMMON_DEPENDS in LLVMConfig.cmake CMake requires that all targets expressed as dependencies exist, so we can't have intrinsics_gen in LLVM_COMMON_DEPENDS when it is written out, otherwise projects building out of tree will have CMake errors. llvm-svn: 283234 --- diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt index 96ae83b..be74751 100644 --- a/llvm/cmake/modules/CMakeLists.txt +++ b/llvm/cmake/modules/CMakeLists.txt @@ -20,6 +20,15 @@ foreach(lib ${LLVM_AVAILABLE_LIBS}) "${all_llvm_lib_deps}\nset_property(GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib} ${llvm_lib_deps})") endforeach(lib) +# CMake requires that all targets expressed as dependencies exist, so we can't +# have intrinsics_gen in LLVM_COMMON_DEPENDS when it is written out, otherwise +# projects building out of tree will have CMake errors. This only gets hit when +# LLVM_ENABLE_MODULES=On. Eventually we should come up with a better solution to +# this, but there is no easy solution. +if(intrinsics_gen IN_LIST LLVM_COMMON_DEPENDS) + list(REMOVE_ITEM LLVM_COMMON_DEPENDS intrinsics_gen) +endif() + # Generate LLVMConfig.cmake for the build tree. set(LLVM_CONFIG_CODE " # LLVM_BUILD_* values available only from LLVM build tree.