# HG changeset patch # User Sebastien Jodogne # Date 1523968338 -7200 # Node ID a1a331884ebcf82b5ea2a79f1f21c53b5539b884 # Parent e0e377a486266e2287fe391936c26eec62198aca fix diff -r e0e377a48626 -r a1a331884ebc Resources/DownloadOrthancFramework.cmake --- a/Resources/DownloadOrthancFramework.cmake Tue Apr 17 14:23:25 2018 +0200 +++ b/Resources/DownloadOrthancFramework.cmake Tue Apr 17 14:32:18 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}")