summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2014-11-07 16:08:19 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2014-11-07 16:08:19 +0000
commit13437e8414dd5044ad67c72cf68aae1771402f95 (patch)
tree16996f13e22d1e8c4e172db6c6d60c7609da6d0b /llvm/unittests/Support
parentf9dcf9029b8dca88bc8547267e28c8f3fbb7ed3c (diff)
downloadbcm5719-llvm-13437e8414dd5044ad67c72cf68aae1771402f95.tar.gz
bcm5719-llvm-13437e8414dd5044ad67c72cf68aae1771402f95.zip
[CMake] LLVMSupport: Give system_libs PRIVATE scope when LLVMSupport is built as SHARED. Users of LLVMSupport won't inherit ${system_libs}.
unittests/SupporTests is another user of libpthreads. Apply LLVM_SYSTEM_LIBS for him explicitly. llvm-svn: 221531
Diffstat (limited to 'llvm/unittests/Support')
-rw-r--r--llvm/unittests/Support/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/unittests/Support/CMakeLists.txt b/llvm/unittests/Support/CMakeLists.txt
index 97c5c43aeb6..7abdd8ab82b 100644
--- a/llvm/unittests/Support/CMakeLists.txt
+++ b/llvm/unittests/Support/CMakeLists.txt
@@ -42,3 +42,8 @@ add_llvm_unittest(SupportTests
formatted_raw_ostream_test.cpp
raw_ostream_test.cpp
)
+
+# ManagedStatic.cpp uses <pthread>.
+if(LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD)
+ target_link_libraries(SupportTests pthread)
+endif()
OpenPOWER on IntegriCloud