forked from facebook/hhvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: The GTest based tests under hphp/runtime/test were previously not built under the OSS build. This patch adds the CMake support which is enabled with -DRUNTIME_TEST_BIN=on. The results is a binary, hphp_runtime_test. Additionally the tests were ported to ARM. Closes facebook#7793 Differential Revision: D4949257 Pulled By: Orvid fbshipit-source-id: 7b257f0948db63f2148a534f9f20af72895072f8
- Loading branch information
1 parent
1a1273d
commit 0877fc4
Showing
4 changed files
with
53 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
find_package(GTest REQUIRED) | ||
include_directories(${GTEST_INCLUDE_DIRS}) | ||
|
||
set(CXX_SOURCES) | ||
auto_sources(files "*.cpp" "RECURSE" "${CMAKE_CURRENT_SOURCE_DIR}") | ||
list(APPEND CXX_SOURCES ${files} "${CMAKE_CURRENT_SOURCE_DIR}/../../hhvm/process-init.cpp") | ||
|
||
set(HEADER_SOURCES) | ||
auto_sources(files "*.h" "RECURSE" "${CMAKE_CURRENT_SOURCE_DIR}") | ||
list(APPEND HEADER_SOURCES ${files}) | ||
|
||
add_executable(hphp_runtime_test ${CXX_SOURCES} ${HEADER_SOURCES}) | ||
link_object_libraries(hphp_runtime_test ${HHVM_WHOLE_ARCHIVE_LIBRARIES}) | ||
target_link_libraries(hphp_runtime_test ${HHVM_LINK_LIBRARIES} gtest gmock) | ||
embed_all_systemlibs(hphp_runtime_test "${CMAKE_CURRENT_BINARY_DIR}/../.." | ||
"${CMAKE_CURRENT_BINARY_DIR}/hphp_runtime_test") | ||
|
||
auto_source_group("hphp_runtime_test" "${CMAKE_CURRENT_SOURCE_DIR}" | ||
${CXX_SOURCES} ${HEADER_SOURCES}) | ||
add_dependencies(hphp_runtime_test hphp_system) | ||
if (ENABLE_COTIRE) | ||
cotire(hphp_runtime_test) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters