raise a CMake AUTHOR_WARNING if current branch does not match branch used to install cgal

This commit is contained in:
Eric Berberich 2012-10-22 23:10:57 +00:00
parent 358b8bb92b
commit fc6d74c399
1 changed files with 11 additions and 0 deletions

View File

@ -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} )