[Lldb-commits] [lldb] r240935 - Add Support for LLVM_INSTALL_TOOLCHAIN_ONLY (bug #23784)

Pavel Labath labath at google.com
Mon Jun 29 04:03:22 PDT 2015


Author: labath
Date: Mon Jun 29 06:03:21 2015
New Revision: 240935

URL: http://llvm.org/viewvc/llvm-project?rev=240935&view=rev
Log:
Add Support for LLVM_INSTALL_TOOLCHAIN_ONLY (bug #23784)

Support for LLVM_INSTALL_TOOLCHAIN_ONLY is modeled on same functionality
from LLVM and Clang CMake files.

Patch by: Eugene Zelenko

Modified:
    lldb/trunk/cmake/modules/AddLLDB.cmake
    lldb/trunk/cmake/modules/LLDBConfig.cmake
    lldb/trunk/cmake/modules/LLDBStandalone.cmake

Modified: lldb/trunk/cmake/modules/AddLLDB.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/AddLLDB.cmake?rev=240935&r1=240934&r2=240935&view=diff
==============================================================================
--- lldb/trunk/cmake/modules/AddLLDB.cmake (original)
+++ lldb/trunk/cmake/modules/AddLLDB.cmake Mon Jun 29 06:03:21 2015
@@ -70,15 +70,17 @@ macro(add_lldb_library name)
     target_link_libraries(${name} ${cmake_2_8_12_PUBLIC} ${CLANG_USED_LIBS})
     llvm_config(${name} ${LLVM_LINK_COMPONENTS})
 
-    if (PARAM_SHARED)
-      install(TARGETS ${name}
-        RUNTIME DESTINATION bin
-        LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
-        ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
-    else()
-      install(TARGETS ${name}
-        LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
-        ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
+    if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "liblldb")
+      if (PARAM_SHARED)
+        install(TARGETS ${name}
+          RUNTIME DESTINATION bin
+          LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+          ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
+      else()
+        install(TARGETS ${name}
+          LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+          ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
+      endif()
     endif()
   endif()
 

Modified: lldb/trunk/cmake/modules/LLDBConfig.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBConfig.cmake?rev=240935&r1=240934&r2=240935&view=diff
==============================================================================
--- lldb/trunk/cmake/modules/LLDBConfig.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake Mon Jun 29 06:03:21 2015
@@ -183,12 +183,14 @@ include_directories(BEFORE
   ${CMAKE_CURRENT_SOURCE_DIR}/include
   )
 
-install(DIRECTORY include/
-  DESTINATION include
-  FILES_MATCHING
-  PATTERN "*.h"
-  PATTERN ".svn" EXCLUDE
-  )
+if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+  install(DIRECTORY include/
+    DESTINATION include
+    FILES_MATCHING
+    PATTERN "*.h"
+    PATTERN ".svn" EXCLUDE
+    )
+endif()
 
 if (NOT LIBXML2_FOUND)
   find_package(LibXml2)

Modified: lldb/trunk/cmake/modules/LLDBStandalone.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBStandalone.cmake?rev=240935&r1=240934&r2=240935&view=diff
==============================================================================
--- lldb/trunk/cmake/modules/LLDBStandalone.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBStandalone.cmake Mon Jun 29 06:03:21 2015
@@ -4,6 +4,8 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
   project(lldb)
   cmake_minimum_required(VERSION 2.8)
 
+  option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
+
   set(LLDB_PATH_TO_LLVM_SOURCE "" CACHE PATH
     "Path to LLVM source code. Not necessary if using an installed LLVM.")
   set(LLDB_PATH_TO_LLVM_BUILD "" CACHE PATH





More information about the lldb-commits mailing list