diff options
author | PoYao Chang <rZhBoYao@gmail.com> | 2021-12-16 13:32:12 -0500 |
---|---|---|
committer | Louis Dionne <ldionne.2@gmail.com> | 2021-12-16 13:32:40 -0500 |
commit | 1c4867e6fc507fe6e81cfc0e3c7148307b4b7433 (patch) | |
tree | 155027a90fb6a485981a92b5453f49addab17d13 /libunwind/CMakeLists.txt | |
parent | ceb80557e523f1894799ebadd5d985e11ee80461 (diff) | |
download | llvm-1c4867e6fc507fe6e81cfc0e3c7148307b4b7433.tar.gz |
[libunwind] Provide a way to conveniently install libunwind headers
This adds a CMake option (defaults to OFF to not be intrusive) to activate
2 new targets `install-unwind-headers` and `install-unwind-headers-stripped`.
So, for example:
cmake -S runtimes -B build -G Ninja \
-DLLVM_ENABLE_RUNTIMES='libunwind' \
-DLIBUNWIND_INSTALL_HEADERS=ON
And then, `ninja -C build install-unwind` would install headers in addition
to good ol' dylibs and archives, i.e., targets `install-unwind*` `DEPENDS`
on `install-unwind-headers*`. On the other hand,
`ninja -C build install-unwind-headers` gives you headers only.
Differential Revision: https://reviews.llvm.org/D115535
Diffstat (limited to 'libunwind/CMakeLists.txt')
-rw-r--r-- | libunwind/CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt index a63dc453ffb6..eb478e4e7730 100644 --- a/libunwind/CMakeLists.txt +++ b/libunwind/CMakeLists.txt @@ -78,6 +78,7 @@ option(LIBUNWIND_INCLUDE_TESTS "Build the libunwind tests." ${LLVM_INCLUDE_TESTS option(LIBUNWIND_IS_BAREMETAL "Build libunwind for baremetal targets." OFF) option(LIBUNWIND_USE_FRAME_HEADER_CACHE "Cache frame headers for unwinding. Requires locking dl_iterate_phdr." OFF) option(LIBUNWIND_REMEMBER_HEAP_ALLOC "Use heap instead of the stack for .cfi_remember_state." OFF) +option(LIBUNWIND_INSTALL_HEADERS "Install the libunwind headers." OFF) set(LIBUNWIND_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE STRING "Define suffix of library directory name (32/64)") @@ -372,7 +373,7 @@ endif() # Setup Source Code #=============================================================================== -include_directories(include) +add_subdirectory(include) add_subdirectory(src) |