ENH: add commands to clone Google Test into project
This commit is contained in:
parent
7c78897f19
commit
ab5df877fc
@ -1,7 +1,12 @@
|
||||
project(${CMAKE_PROJECT_NAME}_tests)
|
||||
|
||||
if(NOT EXISTS lib/googletest)
|
||||
file(MAKE_DIRECTORY lib/googletest)
|
||||
# Clone Google Test
|
||||
set(GOOGLETEST_DIR ${CMAKE_SOURCE_DIR}/tests/lib/googletest)
|
||||
if(NOT EXISTS ${GOOGLETEST_DIR})
|
||||
find_package(Git REQUIRED)
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} clone https://github.com/google/googletest ${GOOGLETEST_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
add_subdirectory(lib/googletest)
|
||||
|
Loading…
x
Reference in New Issue
Block a user