1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/unittests/Support/CMakeLists.txt
Mehdi Amini 865fad06c6 Add a C++11 ThreadPool implementation in LLVM
This is a very simple implementation of a thread pool using C++11
thread. It accepts any std::function<void()> for asynchronous
execution. Individual task can be synchronize using the returned
future, or the client can block on the full queue completion.

In case LLVM is configured with Threading disabled, it falls back
to sequential execution using std::async with launch:deferred.

This is intended to support parallelism for ThinLTO processing in
linker plugin, but is generic enough for any other uses.

Differential Revision: http://reviews.llvm.org/D15464

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 255444
2015-12-12 22:55:25 +00:00

59 lines
1.2 KiB
CMake

set(LLVM_LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD}
Support
)
add_llvm_unittest(SupportTests
AlignOfTest.cpp
AllocatorTest.cpp
ArrayRecyclerTest.cpp
BlockFrequencyTest.cpp
BranchProbabilityTest.cpp
Casting.cpp
CommandLineTest.cpp
CompressionTest.cpp
ConvertUTFTest.cpp
DataExtractorTest.cpp
DwarfTest.cpp
EndianStreamTest.cpp
EndianTest.cpp
ErrorOrTest.cpp
FileOutputBufferTest.cpp
IteratorTest.cpp
LEB128Test.cpp
LineIteratorTest.cpp
LockFileManagerTest.cpp
MD5Test.cpp
ManagedStatic.cpp
MathExtrasTest.cpp
MemoryBufferTest.cpp
MemoryTest.cpp
Path.cpp
ProcessTest.cpp
ProgramTest.cpp
RegexTest.cpp
ReplaceFileTest.cpp
ScaledNumberTest.cpp
SourceMgrTest.cpp
SpecialCaseListTest.cpp
StreamingMemoryObject.cpp
StringPool.cpp
SwapByteOrderTest.cpp
TargetRegistry.cpp
ThreadLocalTest.cpp
ThreadPool.cpp
TimeValueTest.cpp
TrailingObjectsTest.cpp
UnicodeTest.cpp
YAMLIOTest.cpp
YAMLParserTest.cpp
formatted_raw_ostream_test.cpp
raw_ostream_test.cpp
raw_pwrite_stream_test.cpp
)
# ManagedStatic.cpp uses <pthread>.
if(LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD)
target_link_libraries(SupportTests pthread)
endif()