Handle max deadlines in Futex
[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(CMAKE_SYSTEM_NAME STREQUAL "Windows")
20   # Check target architecture
21   if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
22     message(FATAL_ERROR "Folly requires a 64bit target architecture.")
23   endif()
24
25   if (MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920)
26     set(MSVC_IS_2017 ON)
27   elseif (MSVC_VERSION EQUAL 1900)
28     set(MSVC_IS_2017 OFF)
29   else()
30     message(
31       FATAL_ERROR
32       "This build script only supports building Folly on 64-bit Windows with "
33       "Visual Studio 2015 or Visual Studio 2017. "
34       "MSVC version '${MSVC_VERSION}' is not supported."
35     )
36   endif()
37 endif()
38
39 set(FOLLY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/folly")
40
41 # Generate a few tables and create the main config file.
42 find_package(PythonInterp REQUIRED)
43 add_custom_command(
44   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/folly/build/EscapeTables.cpp
45   COMMAND
46     ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/folly/build
47   COMMAND
48     ${PYTHON_EXECUTABLE} "${FOLLY_DIR}/build/generate_escape_tables.py"
49     --install_dir ${CMAKE_CURRENT_BINARY_DIR}/folly/build
50   DEPENDS ${FOLLY_DIR}/build/generate_escape_tables.py
51   COMMENT "Generating the escape tables..." VERBATIM
52 )
53 add_custom_command(
54   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/folly/build/FormatTables.cpp
55   COMMAND
56     ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/folly/build
57   COMMAND
58     ${PYTHON_EXECUTABLE} "${FOLLY_DIR}/build/generate_format_tables.py"
59     --install_dir ${CMAKE_CURRENT_BINARY_DIR}/folly/build
60   DEPENDS ${FOLLY_DIR}/build/generate_format_tables.py
61   COMMENT "Generating the format tables..." VERBATIM
62 )
63 add_custom_command(
64   OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/folly/build/GroupVarintTables.cpp"
65   COMMAND
66     ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/folly/build
67   COMMAND
68     ${PYTHON_EXECUTABLE} "${FOLLY_DIR}/build/generate_varint_tables.py"
69     --install_dir ${CMAKE_CURRENT_BINARY_DIR}/folly/build
70   DEPENDS ${FOLLY_DIR}/build/generate_varint_tables.py
71   COMMENT "Generating the group varint tables..." VERBATIM
72 )
73
74 include(folly-deps) # Find the required packages
75
76 if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
77   include(FollyCompilerMSVC)
78 else()
79   include(FollyCompilerUnix)
80 endif()
81 include(FollyFunctions)
82
83 include(FollyConfigChecks)
84 configure_file(
85   ${CMAKE_CURRENT_SOURCE_DIR}/CMake/folly-config.h.cmake
86   ${CMAKE_CURRENT_BINARY_DIR}/folly/folly-config.h
87 )
88
89 # Main folly library files
90 auto_sources(files "*.cpp" "RECURSE" "${FOLLY_DIR}")
91 auto_sources(hfiles "*.h" "RECURSE" "${FOLLY_DIR}")
92
93 # Exclude tests, benchmarks, and other standalone utility executables from the
94 # library sources.  Test sources are listed separately below.
95 REMOVE_MATCHES_FROM_LISTS(files hfiles
96   MATCHES
97     "/build/"
98     "/experimental/hazptr/bench/"
99     "/experimental/hazptr/example/"
100     "/experimental/logging/example/"
101     "/futures/exercises/"
102     "/test/"
103     "/tools/"
104     "Benchmark.cpp$"
105     "Test.cpp$"
106   IGNORE_MATCHES
107     "/Benchmark.cpp$"
108 )
109 list(REMOVE_ITEM files
110   ${FOLLY_DIR}/experimental/JSONSchemaTester.cpp
111   ${FOLLY_DIR}/experimental/io/HugePageUtil.cpp
112   ${FOLLY_DIR}/experimental/symbolizer/ElfUtil.cpp
113   ${FOLLY_DIR}/futures/test/Benchmark.cpp
114 )
115 list(REMOVE_ITEM hfiles
116   ${FOLLY_DIR}/detail/SlowFingerprint.h
117   ${FOLLY_DIR}/detail/FingerprintPolynomial.h
118 )
119
120 # Exclude specific sources if we do not have third-party libraries
121 # required to build them.
122 if (NOT FOLLY_USE_SYMBOLIZER)
123   REMOVE_MATCHES_FROM_LISTS(files hfiles
124     MATCHES
125       "/experimental/exception_tracer/"
126       "/experimental/symbolizer/"
127   )
128   list(REMOVE_ITEM files
129     ${FOLLY_DIR}/SingletonStackTrace.cpp
130   )
131 endif()
132 if (NOT ${LIBURCU_FOUND})
133   list(REMOVE_ITEM files
134     ${FOLLY_DIR}/experimental/RCUUtils.cpp
135   )
136   list(REMOVE_ITEM hfiles
137     ${FOLLY_DIR}/experimental/RCURefCount.h
138     ${FOLLY_DIR}/experimental/RCUUtils.h
139   )
140 endif()
141 if (NOT ${LIBAIO_FOUND})
142   list(REMOVE_ITEM files
143     ${FOLLY_DIR}/experimental/io/AsyncIO.cpp
144   )
145   list(REMOVE_ITEM hfiles
146     ${FOLLY_DIR}/experimental/io/AsyncIO.h
147   )
148 endif()
149 if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
150   list(REMOVE_ITEM files
151     ${FOLLY_DIR}/Poly.cpp
152     ${FOLLY_DIR}/Subprocess.cpp
153   )
154   list(REMOVE_ITEM hfiles
155     ${FOLLY_DIR}/Poly.h
156     ${FOLLY_DIR}/Poly-inl.h
157     ${FOLLY_DIR}/detail/PolyDetail.h
158     ${FOLLY_DIR}/detail/TypeList.h
159     ${FOLLY_DIR}/poly/Nullable.h
160     ${FOLLY_DIR}/poly/Regular.h
161   )
162 endif()
163
164 add_library(folly_base OBJECT
165   ${files} ${hfiles}
166   ${CMAKE_CURRENT_BINARY_DIR}/folly/folly-config.h
167   ${CMAKE_CURRENT_BINARY_DIR}/folly/build/EscapeTables.cpp
168   ${CMAKE_CURRENT_BINARY_DIR}/folly/build/FormatTables.cpp
169   ${CMAKE_CURRENT_BINARY_DIR}/folly/build/GroupVarintTables.cpp
170 )
171 auto_source_group(folly ${FOLLY_DIR} ${files} ${hfiles})
172 apply_folly_compile_options_to_target(folly_base)
173 target_include_directories(folly_base PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
174 # Add the generated files to the correct source group.
175 source_group("folly" FILES ${CMAKE_CURRENT_BINARY_DIR}/folly/folly-config.h)
176 source_group("folly\\build" FILES
177   ${CMAKE_CURRENT_BINARY_DIR}/folly/build/EscapeTables.cpp
178   ${CMAKE_CURRENT_BINARY_DIR}/folly/build/FingerprintTables.cpp
179   ${CMAKE_CURRENT_BINARY_DIR}/folly/build/FormatTables.cpp
180   ${CMAKE_CURRENT_BINARY_DIR}/folly/build/GroupVarintTables.cpp
181 )
182
183 if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
184   set(FOLLY_LINK_LIBRARIES
185     ${FOLLY_LINK_LIBRARIES}
186     Iphlpapi.lib
187     Ws2_32.lib
188   )
189 endif()
190
191 set(FOLLY_LINK_LIBRARIES
192   ${FOLLY_LINK_LIBRARIES}
193   ${FOLLY_SHINY_DEPENDENCIES}
194 )
195
196 target_include_directories(folly_base
197   PUBLIC
198     ${FOLLY_INCLUDE_DIRECTORIES}
199     $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
200 )
201
202 foreach (LIB ${FOLLY_SHINY_DEPENDENCIES})
203   target_include_directories(folly_base PUBLIC $<TARGET_PROPERTY:${LIB},INCLUDE_DIRECTORIES>)
204   target_compile_definitions(folly_base PUBLIC $<TARGET_PROPERTY:${LIB},INTERFACE_COMPILE_DEFINITIONS>)
205 endforeach()
206
207 if (FOLLY_HAVE_PTHREAD)
208   target_include_directories(folly_base PUBLIC ${LIBPTHREAD_INCLUDE_DIRS})
209 endif()
210
211 # Now to generate the fingerprint tables
212 add_executable(GenerateFingerprintTables
213   ${FOLLY_DIR}/build/GenerateFingerprintTables.cpp
214   $<TARGET_OBJECTS:folly_base>
215 )
216 target_link_libraries(GenerateFingerprintTables PRIVATE ${FOLLY_LINK_LIBRARIES})
217 target_include_directories(GenerateFingerprintTables PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
218 add_dependencies(GenerateFingerprintTables folly_base)
219 apply_folly_compile_options_to_target(GenerateFingerprintTables)
220 set_property(TARGET GenerateFingerprintTables PROPERTY FOLDER "Build")
221 source_group("" FILES ${FOLLY_DIR}/build/GenerateFingerprintTables.cpp)
222
223 # Compile the fingerprint tables.
224 add_custom_command(
225   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/folly/build/FingerprintTables.cpp
226   COMMAND
227     ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/folly/build
228   COMMAND
229     GenerateFingerprintTables
230     --install_dir ${CMAKE_CURRENT_BINARY_DIR}/folly/build
231   DEPENDS GenerateFingerprintTables
232   COMMENT "Generating the fingerprint tables..."
233 )
234 add_library(folly_fingerprint STATIC
235   ${CMAKE_CURRENT_BINARY_DIR}/folly/build/FingerprintTables.cpp
236   ${FOLLY_DIR}/Fingerprint.h
237   ${FOLLY_DIR}/detail/SlowFingerprint.h
238   ${FOLLY_DIR}/detail/FingerprintPolynomial.h
239   $<TARGET_OBJECTS:folly_base>
240 )
241 target_link_libraries(folly_fingerprint PRIVATE ${FOLLY_LINK_LIBRARIES})
242 target_include_directories(folly_fingerprint PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
243 add_dependencies(folly_fingerprint folly_base)
244 apply_folly_compile_options_to_target(folly_fingerprint)
245
246 # We want to generate a single library and target for folly, but we needed a
247 # two-stage compile for the fingerprint tables, so we create a phony source
248 # file that we modify whenever the base libraries change, causing folly to be
249 # re-linked, making things happy.
250 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp
251   COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp
252   DEPENDS folly_base folly_fingerprint
253 )
254 add_library(folly ${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp $<TARGET_OBJECTS:folly_base>)
255 apply_folly_compile_options_to_target(folly)
256 source_group("" FILES ${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp)
257
258 target_link_libraries(folly PUBLIC ${FOLLY_LINK_LIBRARIES})
259 target_include_directories(folly PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
260
261 install(TARGETS folly
262   EXPORT folly
263   RUNTIME DESTINATION bin
264   LIBRARY DESTINATION lib
265   ARCHIVE DESTINATION lib)
266 auto_install_files(folly ${FOLLY_DIR}
267   ${hfiles}
268   ${FOLLY_DIR}/Fingerprint.h
269   ${FOLLY_DIR}/detail/SlowFingerprint.h
270   ${FOLLY_DIR}/detail/FingerprintPolynomial.h
271 )
272 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/folly/folly-config.h DESTINATION include/folly)
273 install(
274   EXPORT folly
275   DESTINATION share/folly
276   NAMESPACE Folly::
277   FILE folly-targets.cmake
278 )
279
280 # We need a wrapper config file to do the find_package calls to ensure
281 # that all our dependencies are available to link against.
282 file(
283   COPY ${CMAKE_CURRENT_SOURCE_DIR}/CMake/folly-deps.cmake
284   DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/
285 )
286 file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/folly-deps.cmake "\ninclude(folly-targets.cmake)\n")
287 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/folly-deps.cmake DESTINATION share/folly RENAME folly-config.cmake)
288
289 option(BUILD_TESTS "If enabled, compile the tests." OFF)
290 option(BUILD_BROKEN_TESTS "If enabled, compile tests that are known to be broken." OFF)
291 option(BUILD_HANGING_TESTS "If enabled, compile tests that are known to hang." OFF)
292 option(BUILD_SLOW_TESTS "If enabled, compile tests that take a while to run in debug mode." OFF)
293 if (BUILD_TESTS)
294   find_package(GMock MODULE REQUIRED)
295   include(GoogleTest OPTIONAL RESULT_VARIABLE HAVE_CMAKE_GTEST)
296   enable_testing()
297
298   add_library(folly_test_support
299     ${FOLLY_DIR}/test/common/TestMain.cpp
300     ${FOLLY_DIR}/test/DeterministicSchedule.cpp
301     ${FOLLY_DIR}/test/DeterministicSchedule.h
302     ${FOLLY_DIR}/test/SingletonTestStructs.cpp
303     ${FOLLY_DIR}/test/SocketAddressTestHelper.cpp
304     ${FOLLY_DIR}/test/SocketAddressTestHelper.h
305     ${FOLLY_DIR}/experimental/logging/test/TestLogHandler.cpp
306     ${FOLLY_DIR}/experimental/logging/test/TestLogHandler.h
307     ${FOLLY_DIR}/futures/test/TestExecutor.cpp
308     ${FOLLY_DIR}/futures/test/TestExecutor.h
309     ${FOLLY_DIR}/io/async/test/BlockingSocket.h
310     ${FOLLY_DIR}/io/async/test/MockAsyncServerSocket.h
311     ${FOLLY_DIR}/io/async/test/MockAsyncSocket.h
312     ${FOLLY_DIR}/io/async/test/MockAsyncSSLSocket.h
313     ${FOLLY_DIR}/io/async/test/MockAsyncTransport.h
314     ${FOLLY_DIR}/io/async/test/MockAsyncUDPSocket.h
315     ${FOLLY_DIR}/io/async/test/MockTimeoutManager.h
316     ${FOLLY_DIR}/io/async/test/ScopedBoundPort.cpp
317     ${FOLLY_DIR}/io/async/test/ScopedBoundPort.h
318     ${FOLLY_DIR}/io/async/test/SocketPair.cpp
319     ${FOLLY_DIR}/io/async/test/SocketPair.h
320     ${FOLLY_DIR}/io/async/test/TestSSLServer.cpp
321     ${FOLLY_DIR}/io/async/test/TestSSLServer.h
322     ${FOLLY_DIR}/io/async/test/TimeUtil.cpp
323     ${FOLLY_DIR}/io/async/test/TimeUtil.h
324     ${FOLLY_DIR}/io/async/test/UndelayedDestruction.h
325     ${FOLLY_DIR}/io/async/test/Util.h
326   )
327   target_compile_definitions(folly_test_support
328     PUBLIC
329       ${LIBGMOCK_DEFINES}
330   )
331   target_include_directories(folly_test_support
332     PUBLIC
333       ${LIBGMOCK_INCLUDE_DIR}
334   )
335   target_link_libraries(folly_test_support
336     PUBLIC
337       Boost::thread
338       folly
339       ${LIBGMOCK_LIBRARY}
340   )
341   apply_folly_compile_options_to_target(folly_test_support)
342
343   folly_define_tests(
344     DIRECTORY chrono/test/
345       TEST chrono_conv_test SOURCES ConvTest.cpp
346
347     DIRECTORY compression/test/
348       TEST compression_test SLOW SOURCES CompressionTest.cpp
349
350     DIRECTORY container/test/
351       TEST access_test SOURCES AccessTest.cpp
352       TEST array_test SOURCES ArrayTest.cpp
353       TEST bit_iterator_test SOURCES BitIteratorTest.cpp
354       # TODO: CMake's gtest_add_tests() function currently chokes on
355       # EnumerateTest.cpp since it uses macros to define tests.
356       #TEST enumerate_test SOURCES EnumerateTest.cpp
357       TEST evicting_cache_map_test SOURCES EvictingCacheMapTest.cpp
358       TEST foreach_test SOURCES ForeachTest.cpp
359       TEST merge_test SOURCES MergeTest.cpp
360       TEST sparse_byte_set_test SOURCES SparseByteSetTest.cpp
361
362     DIRECTORY concurrency/test/
363       TEST cache_locality_test SOURCES CacheLocalityTest.cpp
364
365     DIRECTORY executors/test/
366       TEST async_helpers_test SOURCES AsyncTest.cpp
367       TEST codel_test SOURCES CodelTest.cpp
368       TEST executor_test SOURCES ExecutorTest.cpp
369       TEST fiber_io_executor_test SOURCES FiberIOExecutorTest.cpp
370       TEST global_executor_test SOURCES GlobalExecutorTest.cpp
371       TEST serial_executor_test SOURCES SerialExecutorTest.cpp
372       TEST thread_pool_executor_test SOURCES ThreadPoolExecutorTest.cpp
373       TEST threaded_executor_test SOURCES ThreadedExecutorTest.cpp
374       TEST timed_drivable_executor_test SOURCES TimedDrivableExecutorTest.cpp
375
376     DIRECTORY executors/task_queue/test/
377       TEST unbounded_blocking_queue_test SOURCES UnboundedBlockingQueueTest.cpp
378
379     DIRECTORY experimental/test/
380       TEST autotimer_test SOURCES AutoTimerTest.cpp
381       TEST bits_test_2 SOURCES BitsTest.cpp
382       TEST bitvector_test SOURCES BitVectorCodingTest.cpp
383       TEST dynamic_parser_test SOURCES DynamicParserTest.cpp
384       TEST eliasfano_test SOURCES EliasFanoCodingTest.cpp
385       TEST event_count_test SOURCES EventCountTest.cpp
386       TEST function_scheduler_test_2 SOURCES FunctionSchedulerTest.cpp
387       TEST future_dag_test SOURCES FutureDAGTest.cpp
388       TEST json_schema_test SOURCES JSONSchemaTest.cpp
389       TEST lock_free_ring_buffer_test SOURCES LockFreeRingBufferTest.cpp
390       #TEST nested_command_line_app_test SOURCES NestedCommandLineAppTest.cpp
391       #TEST program_options_test SOURCES ProgramOptionsTest.cpp
392       # Depends on liburcu
393       #TEST read_mostly_shared_ptr_test SOURCES ReadMostlySharedPtrTest.cpp
394       #TEST ref_count_test SOURCES RefCountTest.cpp
395       TEST stringkeyed_test SOURCES StringKeyedTest.cpp
396       TEST test_util_test SOURCES TestUtilTest.cpp
397       TEST tuple_ops_test SOURCES TupleOpsTest.cpp
398
399     DIRECTORY experimental/io/test/
400       # Depends on libaio
401       #TEST async_io_test SOURCES AsyncIOTest.cpp
402       TEST fs_util_test SOURCES FsUtilTest.cpp
403
404     DIRECTORY experimental/logging/test/
405       TEST async_file_writer_test SOURCES AsyncFileWriterTest.cpp
406       TEST config_parser_test SOURCES ConfigParserTest.cpp
407       TEST config_update_test SOURCES ConfigUpdateTest.cpp
408       TEST file_handler_factory_test SOURCES FileHandlerFactoryTest.cpp
409       TEST glog_formatter_test SOURCES GlogFormatterTest.cpp
410       TEST immediate_file_writer_test SOURCES ImmediateFileWriterTest.cpp
411       TEST log_category_test SOURCES LogCategoryTest.cpp
412       TEST logger_db_test SOURCES LoggerDBTest.cpp
413       TEST logger_test SOURCES LoggerTest.cpp
414       TEST log_level_test SOURCES LogLevelTest.cpp
415       TEST log_message_test SOURCES LogMessageTest.cpp
416       TEST log_name_test SOURCES LogNameTest.cpp
417       TEST log_stream_test SOURCES LogStreamTest.cpp
418       TEST printf_test SOURCES PrintfTest.cpp
419       TEST rate_limiter_test SOURCES RateLimiterTest.cpp
420       TEST standard_log_handler_test SOURCES StandardLogHandlerTest.cpp
421       TEST xlog_test
422         HEADERS
423           XlogHeader1.h
424           XlogHeader2.h
425         SOURCES
426           XlogFile1.cpp
427           XlogFile2.cpp
428           XlogTest.cpp
429
430     DIRECTORY fibers/test/
431       TEST fibers_test SOURCES FibersTest.cpp
432
433     DIRECTORY functional/test/
434       TEST apply_tuple_test SOURCES ApplyTupleTest.cpp
435       TEST partial_test SOURCES PartialTest.cpp
436
437     DIRECTORY futures/test/
438       TEST barrier_test SOURCES BarrierTest.cpp
439       TEST callback_lifetime_test SOURCES CallbackLifetimeTest.cpp
440       TEST collect_test SOURCES CollectTest.cpp
441       TEST context_test SOURCES ContextTest.cpp
442       TEST core_test SOURCES CoreTest.cpp
443       TEST ensure_test SOURCES EnsureTest.cpp
444       TEST fsm_test SOURCES FSMTest.cpp
445       TEST filter_test SOURCES FilterTest.cpp
446       TEST future_splitter_test SOURCES FutureSplitterTest.cpp
447       # MSVC SFINAE bug
448       #TEST future_test SOURCES FutureTest.cpp
449       TEST header_compile_test SOURCES HeaderCompileTest.cpp
450       TEST interrupt_test SOURCES InterruptTest.cpp
451       TEST map_test SOURCES MapTest.cpp
452       TEST non_copyable_lambda_test SOURCES NonCopyableLambdaTest.cpp
453       TEST poll_test SOURCES PollTest.cpp
454       TEST promise_test SOURCES PromiseTest.cpp
455       TEST reduce_test SOURCES ReduceTest.cpp
456       # MSVC SFINAE bug
457       #TEST retrying_test SOURCES RetryingTest.cpp
458       TEST self_destruct_test SOURCES SelfDestructTest.cpp
459       TEST shared_promise_test SOURCES SharedPromiseTest.cpp
460       TEST test_executor_test SOURCES TestExecutorTest.cpp
461       TEST then_compile_test
462         HEADERS
463           ThenCompileTest.h
464         SOURCES
465           ThenCompileTest.cpp
466       TEST then_test SOURCES ThenTest.cpp
467       TEST timekeeper_test SOURCES TimekeeperTest.cpp
468       TEST times_test SOURCES TimesTest.cpp
469       TEST unwrap_test SOURCES UnwrapTest.cpp
470       TEST via_test SOURCES ViaTest.cpp
471       TEST wait_test SOURCES WaitTest.cpp
472       TEST when_test SOURCES WhenTest.cpp
473       TEST while_do_test SOURCES WhileDoTest.cpp
474       TEST will_equal_test SOURCES WillEqualTest.cpp
475       TEST window_test SOURCES WindowTest.cpp
476
477     DIRECTORY gen/test/
478       # MSVC bug can't resolve initializer_list constructor properly
479       #TEST base_test SOURCES BaseTest.cpp
480       TEST combine_test SOURCES CombineTest.cpp
481       TEST parallel_map_test SOURCES ParallelMapTest.cpp
482       TEST parallel_test SOURCES ParallelTest.cpp
483
484     DIRECTORY hash/test/
485       TEST checksum_test SOURCES ChecksumTest.cpp
486       TEST hash_test SOURCES HashTest.cpp
487       TEST spooky_hash_v1_test SOURCES SpookyHashV1Test.cpp
488       TEST spooky_hash_v2_test SOURCES SpookyHashV2Test.cpp
489
490     DIRECTORY io/test/
491       TEST iobuf_test SOURCES IOBufTest.cpp
492       TEST iobuf_cursor_test SOURCES IOBufCursorTest.cpp
493       TEST iobuf_queue_test SOURCES IOBufQueueTest.cpp
494       TEST record_io_test SOURCES RecordIOTest.cpp
495       TEST ShutdownSocketSetTest HANGING
496         SOURCES ShutdownSocketSetTest.cpp
497
498     DIRECTORY io/async/test/
499       TEST async_test
500         CONTENT_DIR certs/
501         HEADERS
502           AsyncSocketTest.h
503           AsyncSSLSocketTest.h
504         SOURCES
505           AsyncPipeTest.cpp
506           AsyncSocketExceptionTest.cpp
507           AsyncSocketTest.cpp
508           AsyncSocketTest2.cpp
509           AsyncSSLSocketTest.cpp
510           AsyncSSLSocketTest2.cpp
511           AsyncSSLSocketWriteTest.cpp
512           AsyncTransportTest.cpp
513           # This is disabled because it depends on things that don't exist
514           # on Windows.
515           #EventHandlerTest.cpp
516           # The async signal handler is not supported on Windows.
517           #AsyncSignalHandlerTest.cpp
518       TEST async_timeout_test SOURCES AsyncTimeoutTest.cpp
519       TEST AsyncUDPSocketTest SOURCES AsyncUDPSocketTest.cpp
520       TEST DelayedDestructionTest SOURCES DelayedDestructionTest.cpp
521       TEST DelayedDestructionBaseTest SOURCES DelayedDestructionBaseTest.cpp
522       TEST DestructorCheckTest SOURCES DestructorCheckTest.cpp
523       TEST EventBaseTest SOURCES EventBaseTest.cpp
524       TEST EventBaseLocalTest SOURCES EventBaseLocalTest.cpp
525       TEST HHWheelTimerTest SOURCES HHWheelTimerTest.cpp
526       TEST HHWheelTimerSlowTests SLOW
527         SOURCES HHWheelTimerSlowTests.cpp
528       TEST NotificationQueueTest SOURCES NotificationQueueTest.cpp
529       TEST RequestContextTest SOURCES RequestContextTest.cpp
530       TEST ScopedEventBaseThreadTest SOURCES ScopedEventBaseThreadTest.cpp
531       TEST ssl_session_test SOURCES SSLSessionTest.cpp
532       TEST writechain_test SOURCES WriteChainAsyncTransportWrapperTest.cpp
533
534     DIRECTORY io/async/ssl/test/
535       TEST ssl_errors_test SOURCES SSLErrorsTest.cpp
536
537     DIRECTORY lang/test/
538       TEST bits_test SOURCES BitsTest.cpp
539       TEST cold_class_test SOURCES ColdClassTest.cpp
540       TEST safe_assert_test SOURCES SafeAssertTest.cpp
541
542     DIRECTORY memory/test/
543       TEST arena_test SOURCES ArenaTest.cpp
544       TEST thread_cached_arena_test SOURCES ThreadCachedArenaTest.cpp
545       TEST mallctl_helper_test SOURCES MallctlHelperTest.cpp
546
547     DIRECTORY portability/test/
548       TEST constexpr_test SOURCES ConstexprTest.cpp
549       TEST libgen-test SOURCES LibgenTest.cpp
550       TEST openssl_portability_test SOURCES OpenSSLPortabilityTest.cpp
551       TEST time-test SOURCES TimeTest.cpp
552
553     DIRECTORY ssl/test/
554       TEST openssl_hash_test SOURCES OpenSSLHashTest.cpp
555
556     DIRECTORY stats/test/
557       TEST histogram_test SOURCES HistogramTest.cpp
558       TEST timeseries_histogram_test SOURCES TimeseriesHistogramTest.cpp
559       TEST timeseries_test SOURCES TimeSeriesTest.cpp
560
561     DIRECTORY synchronization/test/
562       TEST baton_test SOURCES BatonTest.cpp
563       TEST call_once_test SOURCES CallOnceTest.cpp
564       TEST lifo_sem_test SOURCES LifoSemTests.cpp
565       TEST rw_spin_lock_test SOURCES RWSpinLockTest.cpp
566
567     DIRECTORY system/test/
568       TEST memory_mapping_test SOURCES MemoryMappingTest.cpp
569       TEST shell_test SOURCES ShellTest.cpp
570       #TEST subprocess_test SOURCES SubprocessTest.cpp
571       TEST thread_id_test SOURCES ThreadIdTest.cpp
572       TEST thread_name_test SOURCES ThreadNameTest.cpp
573
574     DIRECTORY synchronization/test/
575       TEST atomic_struct_test SOURCES AtomicStructTest.cpp
576
577     DIRECTORY test/
578       TEST ahm_int_stress_test SOURCES AHMIntStressTest.cpp
579       TEST arena_smartptr_test SOURCES ArenaSmartPtrTest.cpp
580       TEST ascii_check_test SOURCES AsciiCaseInsensitiveTest.cpp
581       TEST atomic_bit_set_test SOURCES AtomicBitSetTest.cpp
582       TEST atomic_hash_array_test SOURCES AtomicHashArrayTest.cpp
583       TEST atomic_hash_map_test HANGING
584         SOURCES AtomicHashMapTest.cpp
585       TEST atomic_linked_list_test SOURCES AtomicLinkedListTest.cpp
586       TEST atomic_unordered_map_test SOURCES AtomicUnorderedMapTest.cpp
587       TEST cacheline_padded_test SOURCES CachelinePaddedTest.cpp
588       TEST clock_gettime_wrappers_test SOURCES ClockGettimeWrappersTest.cpp
589       TEST concurrent_skip_list_test SOURCES ConcurrentSkipListTest.cpp
590       TEST conv_test SOURCES ConvTest.cpp
591       TEST cpu_id_test SOURCES CpuIdTest.cpp
592       TEST demangle_test SOURCES DemangleTest.cpp
593       TEST deterministic_schedule_test SOURCES DeterministicScheduleTest.cpp
594       TEST discriminated_ptr_test SOURCES DiscriminatedPtrTest.cpp
595       TEST dynamic_test SOURCES DynamicTest.cpp
596       TEST dynamic_converter_test SOURCES DynamicConverterTest.cpp
597       TEST dynamic_other_test SOURCES DynamicOtherTest.cpp
598       TEST endian_test SOURCES EndianTest.cpp
599       TEST exception_test SOURCES ExceptionTest.cpp
600       TEST exception_wrapper_test SOURCES ExceptionWrapperTest.cpp
601       TEST expected_test SOURCES ExpectedTest.cpp
602       TEST fbvector_test SOURCES FBVectorTest.cpp
603       TEST file_test SOURCES FileTest.cpp
604       #TEST file_lock_test SOURCES FileLockTest.cpp
605       TEST file_util_test HANGING
606         SOURCES FileUtilTest.cpp
607       # TEST fingerprint_test SOURCES FingerprintTest.cpp
608       TEST format_other_test SOURCES FormatOtherTest.cpp
609       TEST format_test SOURCES FormatTest.cpp
610       TEST function_scheduler_test SOURCES FunctionSchedulerTest.cpp
611       TEST function_test BROKEN
612         SOURCES FunctionTest.cpp
613       TEST function_ref_test SOURCES FunctionRefTest.cpp
614       TEST futex_test SOURCES FutexTest.cpp
615       TEST group_varint_test SOURCES GroupVarintTest.cpp
616       TEST group_varint_test_ssse3 SOURCES GroupVarintTest.cpp
617       TEST has_member_fn_traits_test SOURCES HasMemberFnTraitsTest.cpp
618       TEST indestructible_test SOURCES IndestructibleTest.cpp
619       TEST indexed_mem_pool_test BROKEN
620         SOURCES IndexedMemPoolTest.cpp
621       # MSVC Preprocessor stringizing raw string literals bug
622       #TEST json_test SOURCES JsonTest.cpp
623       TEST json_other_test
624         CONTENT_DIR json_test_data/
625         SOURCES
626           JsonOtherTest.cpp
627       TEST lazy_test SOURCES LazyTest.cpp
628       TEST lock_traits_test SOURCES LockTraitsTest.cpp
629       TEST locks_test SOURCES SmallLocksTest.cpp SpinLockTest.cpp
630       TEST logging_test SOURCES LoggingTest.cpp
631       TEST math_test SOURCES MathTest.cpp
632       TEST map_util_test SOURCES MapUtilTest.cpp
633       TEST memcpy_test SOURCES MemcpyTest.cpp
634       TEST memory_idler_test SOURCES MemoryIdlerTest.cpp
635       TEST memory_test SOURCES MemoryTest.cpp
636       TEST move_wrapper_test SOURCES MoveWrapperTest.cpp
637       TEST mpmc_pipeline_test SOURCES MPMCPipelineTest.cpp
638       TEST mpmc_queue_test SLOW
639         SOURCES MPMCQueueTest.cpp
640       TEST network_address_test HANGING
641         SOURCES
642           IPAddressTest.cpp
643           MacAddressTest.cpp
644           SocketAddressTest.cpp
645       TEST optional_test SOURCES OptionalTest.cpp
646       TEST packed_sync_ptr_test HANGING
647         SOURCES PackedSyncPtrTest.cpp
648       TEST padded_test SOURCES PaddedTest.cpp
649       #TEST poly_test SOURCES PolyTest.cpp
650       TEST portability_test SOURCES PortabilityTest.cpp
651       TEST producer_consumer_queue_test SLOW
652         SOURCES ProducerConsumerQueueTest.cpp
653       TEST random_test SOURCES RandomTest.cpp
654       TEST range_test SOURCES RangeTest.cpp
655       TEST scope_guard_test SOURCES ScopeGuardTest.cpp
656       # Heavily dependent on drand and srand48
657       #TEST shared_mutex_test SOURCES SharedMutexTest.cpp
658       # SingletonTest requires Subprocess
659       #TEST singleton_test SOURCES SingletonTest.cpp
660       TEST singleton_test_global SOURCES SingletonTestGlobal.cpp
661       TEST singleton_thread_local_test SOURCES SingletonThreadLocalTest.cpp
662       TEST small_vector_test SOURCES small_vector_test.cpp
663       TEST sorted_vector_types_test SOURCES sorted_vector_test.cpp
664       TEST string_test SOURCES StringTest.cpp
665       TEST synchronized_test SOURCES SynchronizedTest.cpp
666       TEST thread_cached_int_test SOURCES ThreadCachedIntTest.cpp
667       TEST thread_local_test SOURCES ThreadLocalTest.cpp
668       TEST timeout_queue_test SOURCES TimeoutQueueTest.cpp
669       TEST token_bucket_test SOURCES TokenBucketTest.cpp
670       TEST traits_test SOURCES TraitsTest.cpp
671       TEST try_test SOURCES TryTest.cpp
672       TEST unit_test SOURCES UnitTest.cpp
673       TEST uri_test SOURCES UriTest.cpp
674       TEST varint_test SOURCES VarintTest.cpp
675   )
676 endif()