From 0f0fc907843700fc22e512408af24262fe7cac48 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Tue, 24 Jul 2018 23:27:51 +0000 Subject: [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 --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CMakeLists.txt') 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 -- cgit v1.2.3