lldb can interrupt waitpid, so EINTR shouldn't be an error. This fixes the case
[oota-llvm.git] / lib / Support / CMakeLists.txt
1 add_llvm_library(LLVMSupport
2   APFloat.cpp
3   APInt.cpp
4   APSInt.cpp
5   ARMBuildAttrs.cpp
6   ARMWinEH.cpp
7   Allocator.cpp
8   BlockFrequency.cpp
9   BranchProbability.cpp
10   circular_raw_ostream.cpp
11   CommandLine.cpp
12   Compression.cpp
13   ConvertUTF.c
14   ConvertUTFWrapper.cpp
15   CrashRecoveryContext.cpp
16   DataExtractor.cpp
17   DataStream.cpp
18   Debug.cpp
19   DeltaAlgorithm.cpp
20   DAGDeltaAlgorithm.cpp
21   Dwarf.cpp
22   ErrorHandling.cpp
23   FileUtilities.cpp
24   FileOutputBuffer.cpp
25   FoldingSet.cpp
26   FormattedStream.cpp
27   GraphWriter.cpp
28   Hashing.cpp
29   IntEqClasses.cpp
30   IntervalMap.cpp
31   IntrusiveRefCntPtr.cpp
32   IsInf.cpp
33   IsNAN.cpp
34   LEB128.cpp
35   LineIterator.cpp
36   Locale.cpp
37   LockFileManager.cpp
38   ManagedStatic.cpp
39   MemoryBuffer.cpp
40   MemoryObject.cpp
41   MD5.cpp
42   PluginLoader.cpp
43   PrettyStackTrace.cpp
44   RandomNumberGenerator.cpp
45   Regex.cpp
46   ScaledNumber.cpp
47   SmallPtrSet.cpp
48   SmallVector.cpp
49   SourceMgr.cpp
50   Statistic.cpp
51   StreamableMemoryObject.cpp
52   StringExtras.cpp
53   StringMap.cpp
54   StringPool.cpp
55   StringRef.cpp
56   StringRefMemoryObject.cpp
57   SystemUtils.cpp
58   Timer.cpp
59   ToolOutputFile.cpp
60   Triple.cpp
61   Twine.cpp
62   Unicode.cpp
63   YAMLParser.cpp
64   YAMLTraits.cpp
65   raw_os_ostream.cpp
66   raw_ostream.cpp
67   regcomp.c
68   regerror.c
69   regexec.c
70   regfree.c
71   regstrlcpy.c
72
73 # System
74   Atomic.cpp
75   Disassembler.cpp
76   DynamicLibrary.cpp
77   Errno.cpp
78   Host.cpp
79   IncludeFile.cpp
80   Memory.cpp
81   Mutex.cpp
82   Path.cpp
83   Process.cpp
84   Program.cpp
85   RWMutex.cpp
86   SearchForAddressOfSpecialSymbol.cpp
87   Signals.cpp
88   TargetRegistry.cpp
89   ThreadLocal.cpp
90   Threading.cpp
91   TimeValue.cpp
92   Valgrind.cpp
93   Watchdog.cpp
94
95   ADDITIONAL_HEADERS
96   Unix/Host.inc
97   Unix/Memory.inc
98   Unix/Mutex.inc
99   Unix/Path.inc
100   Unix/Process.inc
101   Unix/Program.inc
102   Unix/RWMutex.inc
103   Unix/Signals.inc
104   Unix/ThreadLocal.inc
105   Unix/TimeValue.inc
106   Unix/Watchdog.inc
107   Windows/DynamicLibrary.inc
108   Windows/Host.inc
109   Windows/Memory.inc
110   Windows/Mutex.inc
111   Windows/Path.inc
112   Windows/Process.inc
113   Windows/Program.inc
114   Windows/RWMutex.inc
115   Windows/Signals.inc
116   Windows/ThreadLocal.inc
117   Windows/TimeValue.inc
118   Windows/Watchdog.inc
119   )
120 set(system_libs)
121 if( NOT MSVC )
122   if( MINGW )
123     set(system_libs ${system_libs} imagehlp psapi shell32)
124   elseif( CMAKE_HOST_UNIX )
125     if( HAVE_LIBRT )
126       set(system_libs ${system_libs} rt)
127     endif()
128     if( HAVE_LIBDL )
129       set(system_libs ${system_libs} ${CMAKE_DL_LIBS})
130     endif()
131     if(LLVM_ENABLE_TERMINFO)
132       if(HAVE_TERMINFO)
133         set(system_libs ${system_libs} ${TERMINFO_LIBS})
134       endif()
135     endif()
136     if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
137       set(system_libs ${system_libs} pthread)
138     endif()
139     if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ )
140       set(system_libs ${system_libs} z)
141     endif()
142   endif( MINGW )
143 endif( NOT MSVC )
144
145
146 if(POLICY CMP0022 AND BUILD_SHARED_LIBS)
147   # FIXME: Should this be really PUBLIC?
148   target_link_libraries(LLVMSupport PUBLIC ${system_libs})
149 else()
150   target_link_libraries(LLVMSupport ${cmake_2_8_12_INTERFACE} ${system_libs})
151 endif()
152
153 set_property(TARGET LLVMSupport PROPERTY LLVM_SYSTEM_LIBS "${system_libs}")