Skip to content

Commit 81cee5a

Browse files
committed
Merge pull request #994 from UV-CDAT/git_check_https
Checking for http and https as well now
2 parents e16c46c + 624c593 commit 81cee5a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,15 @@ if(NOT GIT_PROTOCOL)
135135
OUTPUT_STRIP_TRAILING_WHITESPACE)
136136
if(NOT res EQUAL 0)
137137
set(temp_git_protocol "http://")
138+
execute_process(COMMAND "${GIT_EXECUTABLE}" ls-remote "http://github.com/UV-CDAT/uvcdat.git"
139+
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
140+
RESULT_VARIABLE res
141+
OUTPUT_VARIABLE out
142+
ERROR_QUIET
143+
OUTPUT_STRIP_TRAILING_WHITESPACE)
144+
if (NOT res EQUAL 0)
145+
set(temp_git_protocol "https://")
146+
endif()
138147
endif()
139148

140149
set(GIT_PROTOCOL ${temp_git_protocol} CACHE STRING "Choose protocol to be used by git" FORCE)

0 commit comments

Comments
 (0)