summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2018-07-24 23:27:51 +0000
committerPetr Hosek <phosek@chromium.org>2018-07-24 23:27:51 +0000
commit0f0fc907843700fc22e512408af24262fe7cac48 (patch)
tree8b41f005ec327dfc21eb37fc8fc439fa56907cfb /CMakeLists.txt
parent46e49b957628a99697fbe0a54e7c3d91fff1073b (diff)
downloadlibcxxabi-0f0fc907843700fc22e512408af24262fe7cac48.tar.gz
[CMake] Option to control whether shared/static library is installed
Currently it's only possible to control whether shared or static library build of libc++, libc++abi and libunwind is enabled or disabled and whether to install everything we've built or not. However, it'd be useful to have more fine grained control, e.g. when static libraries are merged together into libc++.a we don't need to install libc++abi.a and libunwind.a. This change adds this option. Differential Revision: https://reviews.llvm.org/D49573 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@337867 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index adfe8c6..764627a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,6 +75,13 @@ set(LIBCXXABI_GCC_TOOLCHAIN "" CACHE PATH "GCC toolchain for cross compiling.")
set(LIBCXXABI_SYSROOT "" CACHE PATH "Sysroot for cross compiling.")
set(LIBCXXABI_LIBCXX_LIBRARY_PATH "" CACHE PATH "The path to libc++ library.")
+cmake_dependent_option(LIBCXXABI_INSTALL_STATIC_LIBRARY
+ "Install the static libc++abi library." ON
+ "LIBCXXABI_ENABLE_STATIC;LIBCXXABI_INSTALL_LIBRARY" OFF)
+cmake_dependent_option(LIBCXXABI_INSTALL_SHARED_LIBRARY
+ "Install the shared libc++abi library." ON
+ "LIBCXXABI_ENABLE_SHARED;LIBCXXABI_INSTALL_LIBRARY" OFF)
+
# Default to building a shared library so that the default options still test
# the libc++abi that is being built. There are two problems with testing a
# static libc++abi. In the case of a standalone build, the tests will link the