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