Mercurial > hg > orthanc
comparison Resources/DownloadOrthancFramework.cmake @ 2537:a1a331884ebc
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 17 Apr 2018 14:32:18 +0200 |
parents | 373d75b90d3b |
children | 8b6b0b6ece6b |
comparison
equal
deleted
inserted
replaced
2536:e0e377a48626 | 2537:a1a331884ebc |
---|---|
155 message(FATAL_ERROR "CMake is not allowed to download from Internet. Please set the ALLOW_DOWNLOADS option to ON") | 155 message(FATAL_ERROR "CMake is not allowed to download from Internet. Please set the ALLOW_DOWNLOADS option to ON") |
156 endif() | 156 endif() |
157 | 157 |
158 set(ORTHANC_ROOT ${CMAKE_BINARY_DIR}/orthanc) | 158 set(ORTHANC_ROOT ${CMAKE_BINARY_DIR}/orthanc) |
159 | 159 |
160 if (NOT EXISTS ${ORTHANC_ROOT}) | 160 if (EXISTS ${ORTHANC_ROOT}) |
161 message("Updating the Orthanc source repository using Mercurial") | |
162 execute_process( | |
163 COMMAND ${ORTHANC_FRAMEWORK_HG} pull | |
164 WORKING_DIRECTORY ${ORTHANC_ROOT} | |
165 RESULT_VARIABLE Failure | |
166 ) | |
167 else() | |
161 message("Forking the Orthanc source repository using Mercurial") | 168 message("Forking the Orthanc source repository using Mercurial") |
162 | |
163 execute_process( | 169 execute_process( |
164 COMMAND ${ORTHANC_FRAMEWORK_HG} clone "https://bitbucket.org/sjodogne/orthanc" | 170 COMMAND ${ORTHANC_FRAMEWORK_HG} clone "https://bitbucket.org/sjodogne/orthanc" |
165 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | 171 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
166 RESULT_VARIABLE Failure | 172 RESULT_VARIABLE Failure |
167 ) | 173 ) |
168 | 174 endif() |
169 if (Failure OR NOT EXISTS ${ORTHANC_ROOT}) | 175 |
170 message(FATAL_ERROR "Cannot fork the Orthanc repository") | 176 if (Failure OR NOT EXISTS ${ORTHANC_ROOT}) |
171 endif() | 177 message(FATAL_ERROR "Cannot fork the Orthanc repository") |
172 endif() | 178 endif() |
173 | 179 |
174 message("Setting branch of the Orthanc repository to: ${ORTHANC_FRAMEWORK_BRANCH}") | 180 message("Setting branch of the Orthanc repository to: ${ORTHANC_FRAMEWORK_BRANCH}") |
175 | 181 |
176 execute_process( | 182 execute_process( |