Skip to content
Snippets Groups Projects
Commit a446916d authored by Pere Mato Vila's avatar Pere Mato Vila
Browse files

Improve the update of roottest clone

parent cb027890
No related branches found
No related tags found
No related merge requests found
......@@ -123,21 +123,17 @@ endif()
if(testing)
include(RootCTest)
if(roottest)
find_package(Git REQUIRED)
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/roottest)
execute_process(COMMAND ${GIT_EXECUTABLE} pull WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/roottest)
add_subdirectory(roottest)
elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../roottest)
add_subdirectory(../roottest roottest)
else()
find_package(Git)
if(NOT GIT_EXECUTABLE)
message(FATAL_ERROR "-- Could not find git needed to clone roottest directory!")
else()
message("-- Could not find roottest directory! Cloning from the repository...")
execute_process(COMMAND ${GIT_EXECUTABLE} clone http://root.cern.ch/git/roottest.git
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(roottest)
endif()
message("-- Could not find roottest directory! Cloning from the repository...")
execute_process(COMMAND ${GIT_EXECUTABLE} clone http://root.cern.ch/git/roottest.git
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(roottest)
endif()
endif()
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment