diff --git a/Installation/cmake/modules/UseCGAL.cmake b/Installation/cmake/modules/UseCGAL.cmake index af05b46b0e1..ea83979f2a1 100644 --- a/Installation/cmake/modules/UseCGAL.cmake +++ b/Installation/cmake/modules/UseCGAL.cmake @@ -19,6 +19,17 @@ if(NOT USE_CGAL_FILE_INCLUDED) include(CGAL_GeneratorSpecificSettings) include(CGAL_TweakFindBoost) + set(CGAL_INSTALLED_SCM_BRANCH_NAME ${CGAL_SCM_BRANCH_NAME}) + + if( NOT "${CGAL_INSTALLED_SCM_BRANCH_NAME}" STREQUAL "" ) + include(CGAL_SCM) + message ( STATUS "Code taken from Git branch: ${CGAL_SCM_BRANCH_NAME}") + if ( NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "" AND + NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "${CGAL_INSTALLED_SCM_BRANCH_NAME}") + message (AUTHOR_WARNING "Branch '${CGAL_SCM_BRANCH_NAME}' does not match branch '${CGAL_INSTALLED_SCM_BRANCH_NAME}' from which CGAL has been installed. Please consider to rebuild CGAL from this branch.") + endif() + endif() + set( CGAL_LIBRARIES ) foreach ( component ${CGAL_REQUESTED_COMPONENTS} )