[llvm] r283234 - [CMake] Exclude intrinsics_gen from LLVM_COMMON_DEPENDS in LLVMConfig.cmake
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 4 10:44:28 PDT 2016
Author: cbieneman
Date: Tue Oct 4 12:44:28 2016
New Revision: 283234
URL: http://llvm.org/viewvc/llvm-project?rev=283234&view=rev
Log:
[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.
Modified:
llvm/trunk/cmake/modules/CMakeLists.txt
Modified: llvm/trunk/cmake/modules/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/CMakeLists.txt?rev=283234&r1=283233&r2=283234&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/CMakeLists.txt (original)
+++ llvm/trunk/cmake/modules/CMakeLists.txt Tue Oct 4 12:44:28 2016
@@ -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.
More information about the llvm-commits
mailing list