Moving DestructorCheck from proxygen library to folly.
[folly.git] / CMakeLists.txt
index 38886d6599ab08e0eed0d65f678a967a2836d5df..4058e367882ed49d898caac478bad260d4862cd0 100755 (executable)
@@ -11,6 +11,9 @@ if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio 15( 2017)? Win64")
 elseif ("${CMAKE_GENERATOR}" STREQUAL "Visual Studio 14 2015 Win64")
   set(CMAKE_GENERATOR_TOOLSET "v140</PlatformToolset></PropertyGroup><ItemDefinitionGroup Condition=\"'$(ProjectName)'=='folly'\"><ProjectReference><LinkLibraryDependencies>true</LinkLibraryDependencies></ProjectReference></ItemDefinitionGroup><PropertyGroup><PlatformToolset>v140")
   set(MSVC_IS_2017 OFF)
+elseif ("${CMAKE_GENERATOR}" STREQUAL "Ninja")
+  message("Folly is being built with Ninja, so assuming VS 2017 is being used.")
+  set(MSVC_IS_2017 ON)
 else()
   message(FATAL_ERROR "This build script only supports building Folly on 64-bit Windows with Visual Studio 2015 or Visual Studio 2017.")
 endif()
@@ -263,6 +266,10 @@ if (BUILD_TESTS)
     ${FOLLY_DIR}/io/async/test/UndelayedDestruction.h
     ${FOLLY_DIR}/io/async/test/Util.h
   )
+  target_compile_definitions(folly_test_support
+    PUBLIC
+      ${LIBGMOCK_DEFINES}
+  )
   target_include_directories(folly_test_support
     PUBLIC
       ${LIBGMOCK_INCLUDE_DIR}
@@ -379,6 +386,7 @@ if (BUILD_TESTS)
       TEST async_timeout_test SOURCES AsyncTimeoutTest.cpp
       TEST AsyncUDPSocketTest SOURCES AsyncUDPSocketTest.cpp
       TEST DelayedDestructionTest SOURCES DelayedDestructionTest.cpp
+      TEST DestructorCheckTest SOURCES DestructorCheckTest.cpp
       TEST DelayedDestructionBaseTest SOURCES DelayedDestructionBaseTest.cpp
       TEST EventBaseTest SOURCES EventBaseTest.cpp
       TEST EventBaseLocalTest SOURCES EventBaseLocalTest.cpp