Skip to content

Commit f042fd4

Browse files
committed
[libunwind][cmake] Add an option to enable/disable tests
Reviewed By: ldionne, compnerd Differential Revision: https://reviews.llvm.org/D96342
1 parent 95ef556 commit f042fd4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libunwind/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ option(LIBUNWIND_ENABLE_THREADS "Build libunwind with threading support." ON)
6363
option(LIBUNWIND_WEAK_PTHREAD_LIB "Use weak references to refer to pthread functions." OFF)
6464
option(LIBUNWIND_USE_COMPILER_RT "Use compiler-rt instead of libgcc" OFF)
6565
option(LIBUNWIND_INCLUDE_DOCS "Build the libunwind documentation." ${LLVM_INCLUDE_DOCS})
66+
option(LIBUNWIND_INCLUDE_TESTS "Build the libunwind tests." ${LLVM_INCLUDE_TESTS})
6667
option(LIBUNWIND_IS_BAREMETAL "Build libunwind for baremetal targets." OFF)
6768
option(LIBUNWIND_USE_FRAME_HEADER_CACHE "Cache frame headers for unwinding. Requires locking dl_iterate_phdr." OFF)
6869
option(LIBUNWIND_REMEMBER_HEAP_ALLOC "Use heap instead of the stack for .cfi_remember_state." OFF)
@@ -344,6 +345,6 @@ if (LIBUNWIND_INCLUDE_DOCS)
344345
add_subdirectory(docs)
345346
endif()
346347

347-
if (EXISTS ${LLVM_CMAKE_PATH})
348+
if (LIBUNWIND_INCLUDE_TESTS AND EXISTS ${LLVM_CMAKE_PATH})
348349
add_subdirectory(test)
349350
endif()

0 commit comments

Comments
 (0)