X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=blobdiff_plain;f=CMakeLists.txt;h=d581616537aad708c1c681be566ac37e5be8d134;hp=b0982f940d942eda93312141b46f074049758e68;hb=614a2213b3d18c09b4fba87795fe5c9923acb085;hpb=b50a3dd838801676f9f5a3d5f0b9a094a8175d72 diff --git a/CMakeLists.txt b/CMakeLists.txt index b0982f94..d5816165 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,12 +34,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") "MSVC version '${MSVC_VERSION}' is not supported." ) endif() -else() - message( - FATAL_ERROR - "The CMake build should only be used on Windows. " - "For every other platform, use autoconf." - ) endif() set(FOLLY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/folly") @@ -298,8 +292,11 @@ option(BUILD_HANGING_TESTS "If enabled, compile tests that are known to hang." O option(BUILD_SLOW_TESTS "If enabled, compile tests that take a while to run in debug mode." OFF) if (BUILD_TESTS) find_package(GMock MODULE REQUIRED) + include(GoogleTest OPTIONAL RESULT_VARIABLE HAVE_CMAKE_GTEST) + enable_testing() add_library(folly_test_support + ${FOLLY_DIR}/test/common/TestMain.cpp ${FOLLY_DIR}/test/DeterministicSchedule.cpp ${FOLLY_DIR}/test/DeterministicSchedule.h ${FOLLY_DIR}/test/SingletonTestStructs.cpp @@ -348,13 +345,15 @@ if (BUILD_TESTS) TEST chrono_conv_test SOURCES ConvTest.cpp DIRECTORY compression/test/ - TEST compression_test SOURCES CompressionTest.cpp + TEST compression_test SLOW SOURCES CompressionTest.cpp DIRECTORY container/test/ TEST access_test SOURCES AccessTest.cpp TEST array_test SOURCES ArrayTest.cpp TEST bit_iterator_test SOURCES BitIteratorTest.cpp - TEST enumerate_test SOURCES EnumerateTest.cpp + # TODO: CMake's gtest_add_tests() function currently chokes on + # EnumerateTest.cpp since it uses macros to define tests. + #TEST enumerate_test SOURCES EnumerateTest.cpp TEST evicting_cache_map_test SOURCES EvictingCacheMapTest.cpp TEST foreach_test SOURCES ForeachTest.cpp TEST merge_test SOURCES MergeTest.cpp @@ -372,6 +371,7 @@ if (BUILD_TESTS) TEST serial_executor_test SOURCES SerialExecutorTest.cpp TEST thread_pool_executor_test SOURCES ThreadPoolExecutorTest.cpp TEST threaded_executor_test SOURCES ThreadedExecutorTest.cpp + TEST timed_drivable_executor_test SOURCES TimedDrivableExecutorTest.cpp DIRECTORY executors/task_queue/test/ TEST unbounded_blocking_queue_test SOURCES UnboundedBlockingQueueTest.cpp