From 572658920987ab45d32140d25e519dce5dbcf6c0 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Fri, 28 Jul 2017 15:33:35 +0000 Subject: [PATCH] [CMake] NFC. Add intrinsics_gen target to CMake Exports By creating a dummy of this target in LLVMConfig.cmake, projects that can build against out-of-tree LLVM can freely depend on the target without needing to have conditionals for if LLVM is in-tree or out-of-tree. llvm-svn: 309389 --- llvm/cmake/modules/LLVMConfig.cmake.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in index 7a8eb3674720..169fc9987be8 100644 --- a/llvm/cmake/modules/LLVMConfig.cmake.in +++ b/llvm/cmake/modules/LLVMConfig.cmake.in @@ -79,5 +79,12 @@ if(NOT TARGET LLVMSupport) @llvm_config_include_buildtree_only_exports@ endif() +# By creating intrinsics_gen here, subprojects that depend on LLVM's +# tablegen-generated headers can always depend on this target whether building +# in-tree with LLVM or not. +if(NOT TARGET intrinsics_gen) + add_custom_target(intrinsics_gen) +endif() + set_property(GLOBAL PROPERTY LLVM_TARGETS_CONFIGURED On) include(${LLVM_CMAKE_DIR}/LLVM-Config.cmake)