[PATCH] CMake: enable installing utils

Mircea Trofin mtrofin at google.com
Tue Mar 24 13:02:13 PDT 2015


Hi jfb, dschuff,

Added a new boolean CMake flag, LLVM_INSTALL_UTILS. When set, 
the 'install' target will include in the bin directory the 
utils binaries - e.g. FileCheck. This mirrors the autoconfig
behavior.

http://reviews.llvm.org/D8587

Files:
  CMakeLists.txt
  cmake/modules/AddLLVM.cmake

Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -60,6 +60,8 @@
     "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}")
 endif()
 
+option(LLVM_INSTALL_UTILS "Include utility binaries in the 'install' target." OFF)
+
 option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
 
 option(LLVM_USE_FOLDERS "Enable solution folders in Visual Studio. Disable for Express versions." ON)
Index: cmake/modules/AddLLVM.cmake
===================================================================
--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -547,6 +547,9 @@
 macro(add_llvm_utility name)
   add_llvm_executable(${name} ${ARGN})
   set_target_properties(${name} PROPERTIES FOLDER "Utils")
+  if( LLVM_INSTALL_UTILS )
+    install (TARGETS ${name} RUNTIME DESTINATION bin)
+  endif()
 endmacro(add_llvm_utility name)

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8587.22593.patch
Type: text/x-patch
Size: 989 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150324/ad926e7d/attachment.bin>


More information about the llvm-commits mailing list