1 find_package(GTest REQUIRED)
2 include_directories(${GTEST_INCLUDE_DIRS})
5 auto_sources(files "*.cpp" "RECURSE" "${CMAKE_CURRENT_SOURCE_DIR}")
6 list(APPEND CXX_SOURCES ${files} "${CMAKE_CURRENT_SOURCE_DIR}/../../hhvm/process-init.cpp")
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)
22 cotire(hphp_runtime_test)