[llvm] r309389 - [CMake] NFC. Add intrinsics_gen target to CMake Exports

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 08:33:35 PDT 2017


Author: cbieneman
Date: Fri Jul 28 08:33:35 2017
New Revision: 309389

URL: http://llvm.org/viewvc/llvm-project?rev=309389&view=rev
Log:
[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.

Modified:
    llvm/trunk/cmake/modules/LLVMConfig.cmake.in

Modified: llvm/trunk/cmake/modules/LLVMConfig.cmake.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVMConfig.cmake.in?rev=309389&r1=309388&r2=309389&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/LLVMConfig.cmake.in (original)
+++ llvm/trunk/cmake/modules/LLVMConfig.cmake.in Fri Jul 28 08:33:35 2017
@@ -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)




More information about the llvm-commits mailing list