From 624c593bf086aed910b5af7abf27ecdc0ae1f44b Mon Sep 17 00:00:00 2001 From: Aashish Chaudhary Date: Thu, 29 Jan 2015 17:22:20 -0500 Subject: [PATCH] Checking for http and https as well now --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c1f39572be..36fe97ba16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,6 +135,15 @@ if(NOT GIT_PROTOCOL) OUTPUT_STRIP_TRAILING_WHITESPACE) if(NOT res EQUAL 0) set(temp_git_protocol "http://") + execute_process(COMMAND "${GIT_EXECUTABLE}" ls-remote "http://github.com/UV-CDAT/uvcdat.git" + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + RESULT_VARIABLE res + OUTPUT_VARIABLE out + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + if (NOT res EQUAL 0) + set(temp_git_protocol "https://") + endif() endif() set(GIT_PROTOCOL ${temp_git_protocol} CACHE STRING "Choose protocol to be used by git" FORCE)