summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2014-11-24 22:42:03 +0000
committerEric Fiselier <eric@efcs.ca>2014-11-24 22:42:03 +0000
commitd872a693db85819dc16fca2a7db75c03c7d17f15 (patch)
tree81e988c76434fc2c3a738f530203616f892cca9f /src/CMakeLists.txt
parent30ad829825ee45cab4bc132e5145b2cb7eef4c45 (diff)
[libcxxabi] Refactor building and testing libc++abi without threads
Summary: This patch adds CMake support for building and testing libc++abi without threads. 1. Add `LIBCXXABI_ENABLE_THREADS` option to CMake. 2. Propagate `LIBCXXABI_ENABLE_THREADS` to lit via lit.site.cfg.in 3. Configure tests for `LIBCXXABI_ENABLE_THREADS=OFF Currently the test suite does not work when libc++abi is built without threads because that information does not propagate to the test suite. Reviewers: danalbert, mclow.lists, jroelofs Reviewed By: jroelofs Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6393 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@222702 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3367850..08920e2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -47,7 +47,9 @@ include_directories("${LIBCXXABI_LIBCXX_INCLUDES}")
# Generate library list.
set(libraries ${LIBCXXABI_CXX_ABI_LIBRARIES})
append_if(libraries LIBCXXABI_HAS_C_LIB c)
-append_if(libraries LIBCXXABI_HAS_PTHREAD_LIB pthread)
+if (LIBCXXABI_ENABLE_THREADS)
+ append_if(libraries LIBCXXABI_HAS_PTHREAD_LIB pthread)
+endif()
if (LIBCXXABI_USE_LLVM_UNWINDER)
list(APPEND libraries unwind)