gtest (cmake setup)

This commit is contained in:
Marko Budiselic 2016-11-25 10:54:19 +01:00
parent e1e345ccbb
commit 7fa09a879e
2 changed files with 20 additions and 0 deletions

View File

@ -91,6 +91,7 @@ set(yaml_static_lib ${yaml_source_dir}/libyaml-cpp.a)
set(catch_source_dir "${libs_dir}/Catch")
# load cmake modules: cmake/*.cmake
include(gtest)
include(gbenchmark)
# build memgraph's cypher grammar

19
cmake/gtest.cmake Normal file
View File

@ -0,0 +1,19 @@
if (CMAKE_VERSION VERSION_LESS 3.2)
set(UPDATE_DISCONNECTED_IF_AVAILABLE "")
else()
set(UPDATE_DISCONNECTED_IF_AVAILABLE "UPDATE_DISCONNECTED 1")
endif()
include(DownloadProject/DownloadProject)
download_project(
PROJ googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG master
${UPDATE_DISCONNECTED_IF_AVAILABLE}
)
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR})
include_directories("${googletest_SOURCE_DIR}/googletest/include")
include_directories("${googletest_SOURCE_DIR}/googlemock/include")