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