Mercurial > hg > orthanc-webviewer
diff Resources/Orthanc/DownloadOrthancFramework.cmake @ 195:e481ff4a86cc
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 17 Apr 2018 14:47:37 +0200 |
parents | 20636b255424 |
children | b83fe581f6ae |
line wrap: on
line diff
--- a/Resources/Orthanc/DownloadOrthancFramework.cmake Tue Apr 17 13:46:24 2018 +0200 +++ b/Resources/Orthanc/DownloadOrthancFramework.cmake Tue Apr 17 14:47:37 2018 +0200 @@ -157,18 +157,24 @@ set(ORTHANC_ROOT ${CMAKE_BINARY_DIR}/orthanc) - if (NOT EXISTS ${ORTHANC_ROOT}) + if (EXISTS ${ORTHANC_ROOT}) + message("Updating the Orthanc source repository using Mercurial") + execute_process( + COMMAND ${ORTHANC_FRAMEWORK_HG} pull + WORKING_DIRECTORY ${ORTHANC_ROOT} + RESULT_VARIABLE Failure + ) + else() message("Forking the Orthanc source repository using Mercurial") - execute_process( COMMAND ${ORTHANC_FRAMEWORK_HG} clone "https://bitbucket.org/sjodogne/orthanc" WORKING_DIRECTORY ${CMAKE_BINARY_DIR} RESULT_VARIABLE Failure - ) - - if (Failure OR NOT EXISTS ${ORTHANC_ROOT}) - message(FATAL_ERROR "Cannot fork the Orthanc repository") - endif() + ) + endif() + + if (Failure OR NOT EXISTS ${ORTHANC_ROOT}) + message(FATAL_ERROR "Cannot fork the Orthanc repository") endif() message("Setting branch of the Orthanc repository to: ${ORTHANC_FRAMEWORK_BRANCH}")