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