Destroy promise/future callback functions before waking waiters
[folly.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 3.4.0 FATAL_ERROR)
2
3 # includes
4 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
5 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
6
7 # package information
8 set(PACKAGE_NAME      "folly")
9 set(PACKAGE_VERSION   "0.58.0-dev")
10 set(PACKAGE_STRING    "${PACKAGE_NAME} ${PACKAGE_VERSION}")
11 set(PACKAGE_TARNAME   "${PACKAGE_NAME}-${PACKAGE_VERSION}")
12 set(PACKAGE_BUGREPORT "https://github.com/facebook/folly/issues")
13
14 # 150+ tests in the root folder anyone? No? I didn't think so.
15 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
16
17 project(${PACKAGE_NAME} CXX)
18
19 if (MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911)
20   set(MSVC_IS_2017 ON)
21 elseif (MSVC_VERSION EQUAL 1900)
22   set(MSVC_IS_2017 OFF)
23 else()
24   message(FATAL_ERROR "This build script only supports building '${MSVC_VERSION}' Folly on 64-bit Windows with Visual Studio 2015 or Visual Studio 2017.")
25 endif()
26
27 # Check architecture OS
28 if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
29   message(FATAL_ERROR "Folly requires a 64bit OS")
30 endif()
31 if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
32   message(FATAL_ERROR "You should only be using CMake to build Folly if you are on Windows!")
33 endif()
34
35 set(FOLLY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/folly")
36
37 # Generate a few tables and create the main config file.
38 find_package(PythonInterp REQUIRED)
39 add_custom_command(
40   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/folly/build/EscapeTables.cpp
41   COMMAND ${PYTHON_EXECUTABLE} "${FOLLY_DIR}/build/generate_escape_tables.py"
42   DEPENDS ${FOLLY_DIR}/build/generate_escape_tables.py
43   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/folly/build/
44   COMMENT "Generating the escape tables..." VERBATIM
45 )
46 add_custom_command(
47   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/folly/build/FormatTables.cpp
48   COMMAND ${PYTHON_EXECUTABLE} "${FOLLY_DIR}/build/generate_format_tables.py"
49   DEPENDS ${FOLLY_DIR}/build/generate_format_tables.py
50   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/folly/build/
51   COMMENT "Generating the format tables..." VERBATIM
52 )
53 add_custom_command(
54   OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/folly/build/GroupVarintTables.cpp"
55   COMMAND ${PYTHON_EXECUTABLE} "${FOLLY_DIR}/build/generate_varint_tables.py"
56   DEPENDS ${FOLLY_DIR}/build/generate_varint_tables.py
57   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/folly/build/
58   COMMENT "Generating the group varint tables..." VERBATIM
59 )
60
61 include(folly-deps) # Find the required packages
62 if (LIBPTHREAD_FOUND)
63   set(FOLLY_HAVE_PTHREAD ON)
64 endif()
65 configure_file(
66   ${CMAKE_CURRENT_SOURCE_DIR}/CMake/folly-config.h.cmake
67   ${CMAKE_CURRENT_BINARY_DIR}/folly/folly-config.h
68 )
69
70 include(FollyCompiler)
71 include(FollyFunctions)
72
73 # Main folly library files
74 auto_sources(files "*.cpp" "RECURSE" "${FOLLY_DIR}")
75 auto_sources(hfiles "*.h" "RECURSE" "${FOLLY_DIR}")
76
77 # No need for tests or benchmarks, and we can't build most experimental stuff.
78 REMOVE_MATCHES_FROM_LISTS(files hfiles
79   MATCHES
80     "/build/"
81     "/experimental/exception_tracer/"
82     "/experimental/hazptr/example/"
83     "/experimental/symbolizer/"
84     "/futures/exercises/"
85     "/test/"
86     "Benchmark.cpp$"
87     "Test.cpp$"
88   IGNORE_MATCHES
89     "/Benchmark.cpp$"
90 )
91 list(REMOVE_ITEM files
92   ${FOLLY_DIR}/Subprocess.cpp
93   ${FOLLY_DIR}/SingletonStackTrace.cpp
94   ${FOLLY_DIR}/experimental/JSONSchemaTester.cpp
95   ${FOLLY_DIR}/experimental/RCUUtils.cpp
96   ${FOLLY_DIR}/experimental/io/AsyncIO.cpp
97   ${FOLLY_DIR}/experimental/io/HugePageUtil.cpp
98   ${FOLLY_DIR}/futures/test/Benchmark.cpp
99 )
100 list(REMOVE_ITEM hfiles
101   ${FOLLY_DIR}/Fingerprint.h
102   ${FOLLY_DIR}/detail/SlowFingerprint.h
103   ${FOLLY_DIR}/detail/FingerprintPolynomial.h
104   ${FOLLY_DIR}/experimental/RCURefCount.h
105   ${FOLLY_DIR}/experimental/RCUUtils.h
106   ${FOLLY_DIR}/experimental/io/AsyncIO.h
107 )
108
109 add_library(folly_base OBJECT
110   ${files} ${hfiles}
111   ${CMAKE_CURRENT_BINARY_DIR}/folly/folly-config.h
112   ${CMAKE_CURRENT_BINARY_DIR}/folly/build/EscapeTables.cpp
113   ${CMAKE_CURRENT_BINARY_DIR}/folly/build/FormatTables.cpp
114   ${CMAKE_CURRENT_BINARY_DIR}/folly/build/GroupVarintTables.cpp
115 )
116 auto_source_group(folly ${FOLLY_DIR} ${files} ${hfiles})
117 apply_folly_compile_options_to_target(folly_base)
118 target_include_directories(folly_base PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
119 # Add the generated files to the correct source group.
120 source_group("folly" FILES ${CMAKE_CURRENT_BINARY_DIR}/folly/folly-config.h)
121 source_group("folly\\build" FILES
122   ${CMAKE_CURRENT_BINARY_DIR}/folly/build/EscapeTables.cpp
123   ${CMAKE_CURRENT_BINARY_DIR}/folly/build/FingerprintTables.cpp
124   ${CMAKE_CURRENT_BINARY_DIR}/folly/build/FormatTables.cpp
125   ${CMAKE_CURRENT_BINARY_DIR}/folly/build/GroupVarintTables.cpp
126 )
127
128 set(FOLLY_SHINY_DEPENDENCIES
129   Boost::chrono
130   Boost::context
131   Boost::date_time
132   Boost::filesystem
133   Boost::program_options
134   Boost::regex
135   Boost::system
136   OpenSSL::SSL
137   OpenSSL::Crypto
138 )
139
140 set(FOLLY_LINK_LIBRARIES
141   ${DOUBLE_CONVERSION_LIBRARY}
142   ${LIBEVENT_LIB}
143   ${LIBGFLAGS_LIBRARY}
144   ${LIBGLOG_LIBRARY}
145   Ws2_32.lib
146
147   ${FOLLY_SHINY_DEPENDENCIES}
148 )
149
150 target_include_directories(folly_base
151   PUBLIC
152     ${DOUBLE_CONVERSION_INCLUDE_DIR}
153     ${LIBGFLAGS_INCLUDE_DIR}
154     ${LIBGLOG_INCLUDE_DIR}
155     ${LIBEVENT_INCLUDE_DIR}
156     $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
157 )
158
159 foreach (LIB ${FOLLY_SHINY_DEPENDENCIES})
160   target_include_directories(folly_base PUBLIC $<TARGET_PROPERTY:${LIB},INCLUDE_DIRECTORIES>)
161 endforeach()
162
163 if (FOLLY_HAVE_PTHREAD)
164   target_include_directories(folly_base PUBLIC ${LIBPTHREAD_INCLUDE_DIRS})
165   list(APPEND FOLLY_LINK_LIBRARIES ${LIBPTHREAD_LIBRARIES})
166 endif()
167
168 # Now to generate the fingerprint tables
169 add_executable(GenerateFingerprintTables
170   ${FOLLY_DIR}/build/GenerateFingerprintTables.cpp
171   $<TARGET_OBJECTS:folly_base>
172 )
173 target_link_libraries(GenerateFingerprintTables PRIVATE ${FOLLY_LINK_LIBRARIES})
174 target_include_directories(GenerateFingerprintTables PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
175 add_dependencies(GenerateFingerprintTables folly_base)
176 apply_folly_compile_options_to_target(GenerateFingerprintTables)
177 set_property(TARGET GenerateFingerprintTables PROPERTY FOLDER "Build")
178 source_group("" FILES ${FOLLY_DIR}/build/GenerateFingerprintTables.cpp)
179
180 # Compile the fingerprint tables.
181 add_custom_command(
182   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/folly/build/FingerprintTables.cpp
183   COMMAND GenerateFingerprintTables
184   DEPENDS GenerateFingerprintTables
185   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/folly/build/
186   COMMENT "Generating the fingerprint tables..."
187 )
188 add_library(folly_fingerprint STATIC
189   ${CMAKE_CURRENT_BINARY_DIR}/folly/build/FingerprintTables.cpp
190   ${FOLLY_DIR}/Fingerprint.h
191   ${FOLLY_DIR}/detail/SlowFingerprint.h
192   ${FOLLY_DIR}/detail/FingerprintPolynomial.h
193   $<TARGET_OBJECTS:folly_base>
194 )
195 target_link_libraries(folly_fingerprint PRIVATE ${FOLLY_LINK_LIBRARIES})
196 target_include_directories(folly_fingerprint PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
197 add_dependencies(folly_fingerprint folly_base)
198 apply_folly_compile_options_to_target(folly_fingerprint)
199
200 # We want to generate a single library and target for folly, but we needed a
201 # two-stage compile for the fingerprint tables, so we create a phony source
202 # file that we modify whenever the base libraries change, causing folly to be
203 # re-linked, making things happy.
204 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp
205   COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp
206   DEPENDS folly_base folly_fingerprint
207 )
208 add_library(folly ${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp $<TARGET_OBJECTS:folly_base>)
209 apply_folly_compile_options_to_target(folly)
210 source_group("" FILES ${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp)
211
212 target_link_libraries(folly PUBLIC ${FOLLY_LINK_LIBRARIES})
213 target_include_directories(folly PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
214
215 install(TARGETS folly
216   EXPORT folly
217   RUNTIME DESTINATION bin
218   LIBRARY DESTINATION lib
219   ARCHIVE DESTINATION lib)
220 auto_install_files(folly ${FOLLY_DIR}
221   ${hfiles}
222   ${FOLLY_DIR}/Fingerprint.h
223   ${FOLLY_DIR}/detail/SlowFingerprint.h
224   ${FOLLY_DIR}/detail/FingerprintPolynomial.h
225 )
226 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/folly/folly-config.h DESTINATION include/folly)
227 install(
228   EXPORT folly
229   DESTINATION share/folly
230   NAMESPACE Folly::
231   FILE folly-targets.cmake
232 )
233
234 # We need a wrapper config file to do the find_package calls to ensure
235 # that all our dependencies are available to link against.
236 file(
237   COPY ${CMAKE_CURRENT_SOURCE_DIR}/CMake/folly-deps.cmake
238   DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/
239 )
240 file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/folly-deps.cmake "\ninclude(folly-targets.cmake)\n")
241 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/folly-deps.cmake DESTINATION share/folly RENAME folly-config.cmake)
242
243 option(BUILD_TESTS "If enabled, compile the tests." OFF)
244 option(BUILD_HANGING_TESTS "If enabled, compile tests that are known to hang." OFF)
245 option(BUILD_SLOW_TESTS "If enabled, compile tests that take a while to run in debug mode." OFF)
246 if (BUILD_TESTS)
247   find_package(GMock MODULE REQUIRED)
248
249   add_library(folly_test_support
250     ${FOLLY_DIR}/test/DeterministicSchedule.cpp
251     ${FOLLY_DIR}/test/DeterministicSchedule.h
252     ${FOLLY_DIR}/test/SingletonTestStructs.cpp
253     ${FOLLY_DIR}/test/SocketAddressTestHelper.cpp
254     ${FOLLY_DIR}/test/SocketAddressTestHelper.h
255     ${FOLLY_DIR}/io/async/test/BlockingSocket.h
256     ${FOLLY_DIR}/io/async/test/MockAsyncServerSocket.h
257     ${FOLLY_DIR}/io/async/test/MockAsyncSocket.h
258     ${FOLLY_DIR}/io/async/test/MockAsyncSSLSocket.h
259     ${FOLLY_DIR}/io/async/test/MockAsyncTransport.h
260     ${FOLLY_DIR}/io/async/test/MockAsyncUDPSocket.h
261     ${FOLLY_DIR}/io/async/test/MockTimeoutManager.h
262     ${FOLLY_DIR}/io/async/test/ScopedBoundPort.cpp
263     ${FOLLY_DIR}/io/async/test/ScopedBoundPort.h
264     ${FOLLY_DIR}/io/async/test/SocketPair.cpp
265     ${FOLLY_DIR}/io/async/test/SocketPair.h
266     ${FOLLY_DIR}/io/async/test/TestSSLServer.cpp
267     ${FOLLY_DIR}/io/async/test/TestSSLServer.h
268     ${FOLLY_DIR}/io/async/test/TimeUtil.cpp
269     ${FOLLY_DIR}/io/async/test/TimeUtil.h
270     ${FOLLY_DIR}/io/async/test/UndelayedDestruction.h
271     ${FOLLY_DIR}/io/async/test/Util.h
272   )
273   target_compile_definitions(folly_test_support
274     PUBLIC
275       ${LIBGMOCK_DEFINES}
276   )
277   target_include_directories(folly_test_support
278     PUBLIC
279       ${LIBGMOCK_INCLUDE_DIR}
280   )
281   target_link_libraries(folly_test_support
282     PUBLIC
283       Boost::thread
284       folly
285       ${LIBGMOCK_LIBRARY}
286   )
287   apply_folly_compile_options_to_target(folly_test_support)
288
289   folly_define_tests(
290     DIRECTORY experimental/test/
291       TEST autotimer_test SOURCES AutoTimerTest.cpp
292       TEST bits_test_2 SOURCES BitsTest.cpp
293       TEST bitvector_test SOURCES BitVectorCodingTest.cpp
294       TEST dynamic_parser_test SOURCES DynamicParserTest.cpp
295       TEST eliasfano_test SOURCES EliasFanoCodingTest.cpp
296       TEST event_count_test SOURCES EventCountTest.cpp
297       TEST function_scheduler_test_2 SOURCES FunctionSchedulerTest.cpp
298       TEST future_dag_test SOURCES FutureDAGTest.cpp
299       TEST json_schema_test SOURCES JSONSchemaTest.cpp
300       TEST lock_free_ring_buffer_test SOURCES LockFreeRingBufferTest.cpp
301       #TEST nested_command_line_app_test SOURCES NestedCommandLineAppTest.cpp
302       #TEST program_options_test SOURCES ProgramOptionsTest.cpp
303       # Depends on liburcu
304       #TEST read_mostly_shared_ptr_test SOURCES ReadMostlySharedPtrTest.cpp
305       #TEST ref_count_test SOURCES RefCountTest.cpp
306       TEST stringkeyed_test SOURCES StringKeyedTest.cpp
307       TEST test_util_test SOURCES TestUtilTest.cpp
308       TEST tuple_ops_test SOURCES TupleOpsTest.cpp
309
310     DIRECTORY experimental/io/test/
311       # Depends on libaio
312       #TEST async_io_test SOURCES AsyncIOTest.cpp
313       TEST fs_util_test SOURCES FsUtilTest.cpp
314
315     DIRECTORY fibers/test/
316       TEST fibers_test SOURCES FibersTest.cpp
317
318     DIRECTORY futures/test/
319       TEST futures-test
320         HEADERS
321           ThenCompileTest.h
322         SOURCES
323           BarrierTest.cpp
324           CollectTest.cpp
325           ContextTest.cpp
326           CoreTest.cpp
327           EnsureTest.cpp
328           ExecutorTest.cpp
329           FSMTest.cpp
330           FilterTest.cpp
331           # MSVC SFINAE bug
332           #FutureTest.cpp
333           HeaderCompileTest.cpp
334           InterruptTest.cpp
335           MapTest.cpp
336           NonCopyableLambdaTest.cpp
337           PollTest.cpp
338           PromiseTest.cpp
339           ReduceTest.cpp
340           # MSVC SFINAE bug
341           #RetryingTest.cpp
342           SelfDestructTest.cpp
343           SharedPromiseTest.cpp
344           ThenCompileTest.cpp
345           ThenTest.cpp
346           TimekeeperTest.cpp
347           TimesTest.cpp
348           UnwrapTest.cpp
349           ViaTest.cpp
350           WaitTest.cpp
351           WhenTest.cpp
352           WhileDoTest.cpp
353           WillEqualTest.cpp
354           WindowTest.cpp
355
356     DIRECTORY gen/test/
357       # MSVC bug can't resolve initializer_list constructor properly
358       #TEST base_test SOURCES BaseTest.cpp
359       TEST combine_test SOURCES CombineTest.cpp
360       TEST parallel_map_test SOURCES ParallelMapTest.cpp
361       TEST parallel_test SOURCES ParallelTest.cpp
362
363     DIRECTORY io/test/
364       TEST compression_test SOURCES CompressionTest.cpp
365       TEST iobuf_test SOURCES IOBufTest.cpp
366       TEST iobuf_cursor_test SOURCES IOBufCursorTest.cpp
367       TEST iobuf_queue_test SOURCES IOBufQueueTest.cpp
368       TEST record_io_test SOURCES RecordIOTest.cpp
369       TEST ShutdownSocketSetTest HANGING
370         SOURCES ShutdownSocketSetTest.cpp
371
372     DIRECTORY io/async/test/
373       TEST async_test
374         CONTENT_DIR certs/
375         HEADERS
376           AsyncSocketTest.h
377           AsyncSSLSocketTest.h
378         SOURCES
379           AsyncPipeTest.cpp
380           AsyncSocketExceptionTest.cpp
381           AsyncSocketTest.cpp
382           AsyncSocketTest2.cpp
383           AsyncSSLSocketTest.cpp
384           AsyncSSLSocketTest2.cpp
385           AsyncSSLSocketWriteTest.cpp
386           AsyncTransportTest.cpp
387           # This is disabled because it depends on things that don't exist
388           # on Windows.
389           #EventHandlerTest.cpp
390       TEST async_timeout_test SOURCES AsyncTimeoutTest.cpp
391       TEST AsyncUDPSocketTest SOURCES AsyncUDPSocketTest.cpp
392       TEST DelayedDestructionTest SOURCES DelayedDestructionTest.cpp
393       TEST DelayedDestructionBaseTest SOURCES DelayedDestructionBaseTest.cpp
394       TEST DestructorCheckTest SOURCES DestructorCheckTest.cpp
395       TEST EventBaseTest SOURCES EventBaseTest.cpp
396       TEST EventBaseLocalTest SOURCES EventBaseLocalTest.cpp
397       TEST HHWheelTimerTest SOURCES HHWheelTimerTest.cpp
398       TEST HHWheelTimerSlowTests SLOW
399         SOURCES HHWheelTimerSlowTests.cpp
400       TEST NotificationQueueTest SOURCES NotificationQueueTest.cpp
401       TEST RequestContextTest SOURCES RequestContextTest.cpp
402       TEST ScopedEventBaseThreadTest SOURCES ScopedEventBaseThreadTest.cpp
403       TEST ssl_session_test SOURCES SSLSessionTest.cpp
404       TEST writechain_test SOURCES WriteChainAsyncTransportWrapperTest.cpp
405
406     DIRECTORY io/async/ssl/test/
407       TEST ssl_errors_test SOURCES SSLErrorsTest.cpp
408
409     DIRECTORY portability/test/
410       TEST constexpr_test SOURCES ConstexprTest.cpp
411       TEST libgen-test SOURCES LibgenTest.cpp
412       TEST time-test SOURCES TimeTest.cpp
413
414     DIRECTORY ssl/test/
415       TEST openssl_hash_test SOURCES OpenSSLHashTest.cpp
416
417     DIRECTORY test/
418       TEST ahm_int_stress_test SOURCES AHMIntStressTest.cpp
419       TEST apply_tuple_test SOURCES ApplyTupleTest.cpp
420       TEST arena_test SOURCES ArenaTest.cpp
421       TEST arena_smartptr_test SOURCES ArenaSmartPtrTest.cpp
422       TEST array_test SOURCES ArrayTest.cpp
423       TEST ascii_check_test SOURCES AsciiCaseInsensitiveTest.cpp
424       TEST atomic_bit_set_test SOURCES AtomicBitSetTest.cpp
425       TEST atomic_hash_array_test SOURCES AtomicHashArrayTest.cpp
426       TEST atomic_hash_map_test HANGING
427         SOURCES AtomicHashMapTest.cpp
428       TEST atomic_linked_list_test SOURCES AtomicLinkedListTest.cpp
429       TEST atomic_struct_test SOURCES AtomicStructTest.cpp
430       TEST atomic_unordered_map_test SOURCES AtomicUnorderedMapTest.cpp
431       TEST baton_test SOURCES BatonTest.cpp
432       TEST bit_iterator_test SOURCES BitIteratorTest.cpp
433       TEST bits_test SOURCES BitsTest.cpp
434       TEST cache_locality_test SOURCES CacheLocalityTest.cpp
435       TEST cacheline_padded_test SOURCES CachelinePaddedTest.cpp
436       TEST call_once_test SOURCES CallOnceTest.cpp
437       TEST checksum_test SOURCES ChecksumTest.cpp
438       TEST clock_gettime_wrappers_test SOURCES ClockGettimeWrappersTest.cpp
439       TEST concurrent_skip_list_test SOURCES ConcurrentSkipListTest.cpp
440       TEST container_traits_test SOURCES ContainerTraitsTest.cpp
441       TEST conv_test SOURCES ConvTest.cpp
442       TEST cpu_id_test SOURCES CpuIdTest.cpp
443       TEST demangle_test SOURCES DemangleTest.cpp
444       TEST deterministic_schedule_test SOURCES DeterministicScheduleTest.cpp
445       TEST discriminated_ptr_test SOURCES DiscriminatedPtrTest.cpp
446       TEST dynamic_test SOURCES DynamicTest.cpp
447       TEST dynamic_converter_test SOURCES DynamicConverterTest.cpp
448       TEST dynamic_other_test SOURCES DynamicOtherTest.cpp
449       TEST endian_test SOURCES EndianTest.cpp
450       TEST enumerate_test SOURCES EnumerateTest.cpp
451       TEST evicting_cache_map_test SOURCES EvictingCacheMapTest.cpp
452       TEST exception_test SOURCES ExceptionTest.cpp
453       TEST exception_wrapper_test SOURCES ExceptionWrapperTest.cpp
454       TEST expected_test SOURCES ExpectedTest.cpp
455       TEST fbvector_test SOURCES FBVectorTest.cpp
456       TEST file_test SOURCES FileTest.cpp
457       #TEST file_lock_test SOURCES FileLockTest.cpp
458       TEST file_util_test HANGING
459         SOURCES FileUtilTest.cpp
460       TEST fingerprint_test SOURCES FingerprintTest.cpp
461       TEST foreach_test SOURCES ForeachTest.cpp
462       TEST format_other_test SOURCES FormatOtherTest.cpp
463       TEST format_test SOURCES FormatTest.cpp
464       TEST function_scheduler_test SOURCES FunctionSchedulerTest.cpp
465       TEST function_test SOURCES FunctionTest.cpp
466       TEST function_ref_test SOURCES FunctionRefTest.cpp
467       TEST futex_test SOURCES FutexTest.cpp
468       TEST group_varint_test SOURCES GroupVarintTest.cpp
469       TEST group_varint_test_ssse3 SOURCES GroupVarintTest.cpp
470       TEST has_member_fn_traits_test SOURCES HasMemberFnTraitsTest.cpp
471       TEST hash_test SOURCES HashTest.cpp
472       TEST histogram_test SOURCES HistogramTest.cpp
473       TEST indestructible_test SOURCES IndestructibleTest.cpp
474       TEST indexed_mem_pool_test SOURCES IndexedMemPoolTest.cpp
475       # MSVC Preprocessor stringizing raw string literals bug
476       #TEST json_test SOURCES JsonTest.cpp
477       TEST json_other_test
478         CONTENT_DIR json_test_data/
479         SOURCES
480           JsonOtherTest.cpp
481       TEST lazy_test SOURCES LazyTest.cpp
482       TEST lifosem_test SOURCES LifoSemTests.cpp
483       TEST lock_traits_test SOURCES LockTraitsTest.cpp
484       TEST locks_test SOURCES SmallLocksTest.cpp SpinLockTest.cpp
485       TEST logging_test SOURCES LoggingTest.cpp
486       TEST mallctl_helper_test SOURCES MallctlHelperTest.cpp
487       TEST math_test SOURCES MathTest.cpp
488       TEST map_util_test SOURCES MapUtilTest.cpp
489       TEST memcpy_test SOURCES MemcpyTest.cpp
490       TEST memory_idler_test SOURCES MemoryIdlerTest.cpp
491       TEST memory_mapping_test SOURCES MemoryMappingTest.cpp
492       TEST memory_test SOURCES MemoryTest.cpp
493       TEST merge SOURCES MergeTest.cpp
494       TEST move_wrapper_test SOURCES MoveWrapperTest.cpp
495       TEST mpmc_pipeline_test SOURCES MPMCPipelineTest.cpp
496       TEST mpmc_queue_test SLOW
497         SOURCES MPMCQueueTest.cpp
498       TEST network_address_test HANGING
499         SOURCES
500           IPAddressTest.cpp
501           MacAddressTest.cpp
502           SocketAddressTest.cpp
503       TEST optional_test SOURCES OptionalTest.cpp
504       TEST packed_sync_ptr_test HANGING
505         SOURCES PackedSyncPtrTest.cpp
506       TEST padded_test SOURCES PaddedTest.cpp
507       TEST partial_test SOURCES PartialTest.cpp
508       TEST portability_test SOURCES PortabilityTest.cpp
509       TEST producer_consumer_queue_test SLOW
510         SOURCES ProducerConsumerQueueTest.cpp
511       TEST r_w_spin_lock_test SOURCES RWSpinLockTest.cpp
512       TEST random_test SOURCES RandomTest.cpp
513       TEST range_test SOURCES RangeTest.cpp
514       TEST safe_assert_test SOURCES SafeAssertTest.cpp
515       TEST scope_guard_test SOURCES ScopeGuardTest.cpp
516       # Heavily dependent on drand and srand48
517       #TEST shared_mutex_test SOURCES SharedMutexTest.cpp
518       TEST shell_test SOURCES ShellTest.cpp
519       TEST singleton_test SOURCES SingletonTest.cpp
520       TEST singleton_test_global SOURCES SingletonTestGlobal.cpp
521       TEST singleton_thread_local_test SOURCES SingletonThreadLocalTest.cpp
522       TEST singletonvault_c_test SOURCES SingletonVaultCTest.cpp
523       TEST small_vector_test SOURCES small_vector_test.cpp
524       TEST sorted_vector_types_test SOURCES sorted_vector_test.cpp
525       TEST sparse_byte_set_test SOURCES SparseByteSetTest.cpp
526       TEST spooky_hash_v1_test SOURCES SpookyHashV1Test.cpp
527       TEST spooky_hash_v2_test SOURCES SpookyHashV2Test.cpp
528       TEST string_test SOURCES StringTest.cpp
529       #TEST subprocess_test SOURCES SubprocessTest.cpp
530       TEST synchronized_test SOURCES SynchronizedTest.cpp
531       TEST thread_cached_arena_test SOURCES ThreadCachedArenaTest.cpp
532       TEST thread_cached_int_test SOURCES ThreadCachedIntTest.cpp
533       TEST thread_local_test SOURCES ThreadLocalTest.cpp
534       TEST thread_name_test SOURCES ThreadNameTest.cpp
535       TEST timeout_queue_test SOURCES TimeoutQueueTest.cpp
536       TEST timeseries_histogram_test SOURCES TimeseriesHistogramTest.cpp
537       TEST timeseries_test SOURCES TimeseriesTest.cpp
538       TEST token_bucket_test SOURCES TokenBucketTest.cpp
539       TEST traits_test SOURCES TraitsTest.cpp
540       TEST try_test SOURCES TryTest.cpp
541       TEST unit_test SOURCES UnitTest.cpp
542       TEST uri_test SOURCES UriTest.cpp
543       TEST varint_test SOURCES VarintTest.cpp
544   )
545 endif()