diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2015-06-23 15:34:03 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2015-06-23 15:34:03 +0000 |
commit | 1e65a9f98bc921e4861104e1836c17dad5091cb7 (patch) | |
tree | f0466ef8a6cce6ffacc744c57c8d99b40f6f0bdd | |
parent | 1a68e2cd43049c5cc7efbb6c4cacda8d6776c3bf (diff) | |
download | llvm-1e65a9f98bc921e4861104e1836c17dad5091cb7.zip llvm-1e65a9f98bc921e4861104e1836c17dad5091cb7.tar.gz llvm-1e65a9f98bc921e4861104e1836c17dad5091cb7.tar.bz2 |
Add Support for LLVM_INSTALL_TOOLCHAIN_ONLY
Support for LLVM_INSTALL_TOOLCHAIN_ONLY is modeled on same functionality
from LLVM and Clang CMake files.
Patch by: Eugene Zelenko
llvm-svn: 240418
-rw-r--r-- | lldb/CMakeLists.txt | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt index 22e39ff..f563d35 100644 --- a/lldb/CMakeLists.txt +++ b/lldb/CMakeLists.txt @@ -22,7 +22,7 @@ else () endif () set(LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION ${LLDB_DEFAULT_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION} CACHE BOOL - "Enables using new Python scripts for SWIG API generation .") + "Enables using new Python scripts for SWIG API generation .") # If we are not building as a part of LLVM, build LLDB as an # standalone project, using LLVM as an external library: @@ -30,6 +30,8 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) 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 @@ -199,7 +201,7 @@ if( MSVC ) -wd4521 # Suppress 'warning C4521: 'type' : multiple copy constructors specified' -wd4530 # Suppress 'warning C4530: C++ exception handler used, but unwind semantics are not enabled.' ) -endif() +endif() # If building on a 32-bit system, make sure off_t can store offsets > 2GB if( CMAKE_SIZEOF_VOID_P EQUAL 4 ) @@ -291,9 +293,11 @@ macro(add_lldb_library name) ) add_dependencies(${name} ${LLDB_DEPENDENCIES}) - 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") + install(TARGETS ${name} + LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} + ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + endif() set_target_properties(${name} PROPERTIES FOLDER "lldb libraries") endmacro(add_lldb_library) @@ -307,12 +311,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() # Find libraries or frameworks that may be needed |