enabling <coroutine> from std library for folly when c++ version is 20
[hiphop-php.git] / hphp / runtime / test / CMakeLists.txt
blob6cba69a487b75d049b9f17fc073d1eacf1b3aaf3
1 find_package(GTest REQUIRED)
2 include_directories(${GTEST_INCLUDE_DIRS})
4 set(CXX_SOURCES)
5 auto_sources(files "*.cpp" "RECURSE" "${CMAKE_CURRENT_SOURCE_DIR}")
6 list(APPEND CXX_SOURCES ${files} "${CMAKE_CURRENT_SOURCE_DIR}/../../hhvm/process-init.cpp")
8 set(HEADER_SOURCES)
9 auto_sources(files "*.h" "RECURSE" "${CMAKE_CURRENT_SOURCE_DIR}")
10 list(APPEND HEADER_SOURCES ${files})
12 add_executable(hphp_runtime_test ${CXX_SOURCES} ${HEADER_SOURCES})
13 link_object_libraries(hphp_runtime_test ${HHVM_WHOLE_ARCHIVE_LIBRARIES})
14 target_link_libraries(hphp_runtime_test ${HHVM_LINK_LIBRARIES} gtest gmock)
15 embed_all_systemlibs(hphp_runtime_test "${CMAKE_CURRENT_BINARY_DIR}/../.."
16                               "${CMAKE_CURRENT_BINARY_DIR}/hphp_runtime_test")
18 auto_source_group("hphp_runtime_test" "${CMAKE_CURRENT_SOURCE_DIR}"
19   ${CXX_SOURCES} ${HEADER_SOURCES})
20 target_link_libraries(hphp_runtime_test hphp_system)
21 if (ENABLE_COTIRE)
22   cotire(hphp_runtime_test)
23 endif()