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