@ -402,42 +402,26 @@ endif(DOXYGEN_FOUND)
# t r y t o o b t a i n t h e c u r r e n t v e r s i o n f r o m g i t .
# t r y t o o b t a i n t h e c u r r e n t v e r s i o n f r o m g i t .
include ( GetGitRevisionDescription )
include ( GetGitRevisionDescription )
message ( STATUS "Storm - git hash ${STORM_VERSION_GIT_HASH}" )
message ( STATUS "Storm - git version refspec ${STORM_VERSION_REFSPEC}" )
message ( STATUS "Storm - git version string ${STORM_GIT_VERSION_STRING}" )
get_git_head_revision ( STORM_VERSION_REFSPEC STORM_VERSION_GIT_HASH )
get_git_head_revision ( STORM_VERSION_REFSPEC STORM_VERSION_GIT_HASH )
git_describe_checkout ( STORM_GIT_VERSION_STRING )
message ( STATUS "Storm - git hash ${STORM_VERSION_GIT_HASH}" )
message ( STATUS "Storm - git version refspec ${STORM_VERSION_REFSPEC}" )
message ( STATUS "Storm - git version string ${STORM_GIT_VERSION_STRING}" )
git_describe ( STORM_GIT_VERSION_STRING )
# p a r s e t h e g i t t a g i n t o v a r i a b l e s
# p a r s e t h e g i t t a g i n t o v a r i a b l e s
# s t a r t w i t h m a j o r . m i n o r . p a t c h
# s t a r t w i t h m a j o r . m i n o r . p a t c h
string ( REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(.*)$" STORM_VERSION_MATCH "${STORM_GIT_VERSION_STRING}" )
string ( REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(.*)$" STORM_VERSION_MATCH "${STORM_GIT_VERSION_STRING}" )
message ( STATUS "Storm - version match ${STORM_VERSION_MATCH}" )
set ( STORM_VERSION_MAJOR "${CMAKE_MATCH_1}" )
set ( STORM_VERSION_MAJOR "${CMAKE_MATCH_1}" )
set ( STORM_VERSION_MINOR "${CMAKE_MATCH_2}" )
set ( STORM_VERSION_MINOR "${CMAKE_MATCH_2}" )
set ( STORM_VERSION_PATCH "${CMAKE_MATCH_3}" )
set ( STORM_VERSION_PATCH "${CMAKE_MATCH_3}" )
set ( STORM_GIT_VERSION_REST "${CMAKE_MATCH_4}" )
set ( STORM_GIT_VERSION_REST "${CMAKE_MATCH_4}" )
message ( STATUS "Storm - version ${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH}" )
# p a r s e r e s t o f t h e form ( -label ) - c o m m i t s a h e a d - h a s h - a p p e n d i x
# p a r s e r e s t o f t h e form ( -label ) - c o m m i t s a h e a d - h a s h - a p p e n d i x
string ( REGEX MATCH "^(\\-([a-z][a-z0-9\\.]+))?\\-([0-9]+)\\-([a-z0-9]+)(\\-.*)?$" STORM_VERSION_REST_MATCH "${STORM_GIT_VERSION_REST}" )
string ( REGEX MATCH "^(\\-([a-z][a-z0-9\\.]+))?\\-([0-9]+)\\-([a-z0-9]+)(\\-.*)?$" STORM_VERSION_REST_MATCH "${STORM_GIT_VERSION_REST}" )
message ( STATUS "Storm - version rest match ${STORM_VERSION_REST_MATCH}" )
set ( STORM_VERSION_LABEL "${CMAKE_MATCH_2}" ) # m i g h t b e e m p t y
set ( STORM_VERSION_LABEL "${CMAKE_MATCH_2}" ) # m i g h t b e e m p t y
set ( STORM_VERSION_COMMITS_AHEAD "${CMAKE_MATCH_3}" )
set ( STORM_VERSION_COMMITS_AHEAD "${CMAKE_MATCH_3}" )
set ( STORM_VERSION_TAG_HASH "${CMAKE_MATCH_4}" )
set ( STORM_VERSION_TAG_HASH "${CMAKE_MATCH_4}" )
set ( STORM_VERSION_APPENDIX "${CMAKE_MATCH_5}" ) # m i g h t b e e m p t y
set ( STORM_VERSION_APPENDIX "${CMAKE_MATCH_5}" ) # m i g h t b e e m p t y
message ( STATUS "Storm - version rest ${STORM_VERSION_LABEL} / ${STORM_VERSION_COMMITS_AHEAD} / ${STORM_VERSION_TAG_HASH} / STORM_VERSION_APPENDIX" )
# n o w c h e c k w h e t h e r t h e g i t v e r s i o n l o o k u p f a i l e d
if ( STORM_VERSION_MAJOR MATCHES "NOTFOUND" )
include ( version.cmake )
set ( STORM_VERSION_LABEL "" )
set ( STORM_VERSION_COMMITS_AHEAD 0 )
set ( STORM_VERSION_GIT_HASH "" )
set ( STORM_VERSION_DIRTY boost::none )
message ( WARNING "Storm - git version information not available, statically assuming version ${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH}." )
else ( )
set ( STORM_VERSION_DIRTY boost::none )
if ( NOT "${STORM_GIT_VERSION_STRING}" STREQUAL "" )
if ( "${STORM_VERSION_APPENDIX}" MATCHES "^.*dirty.*$" )
if ( "${STORM_VERSION_APPENDIX}" MATCHES "^.*dirty.*$" )
set ( STORM_VERSION_DIRTY "true" )
set ( STORM_VERSION_DIRTY "true" )
else ( )
else ( )
@ -445,6 +429,15 @@ else()
endif ( )
endif ( )
endif ( )
endif ( )
# n o w c h e c k w h e t h e r t h e g i t v e r s i o n l o o k u p f a i l e d
set ( STORM_VERSION_SOURCE "VersionSource::Git" )
if ( STORM_GIT_VERSION_STRING MATCHES "NOTFOUND" )
set ( STORM_VERSION_SOURCE "VersionSource::Static" )
set ( STORM_VERSION_COMMITS_AHEAD "boost::none" )
include ( version.cmake )
message ( WARNING "Storm - git version information not available, statically assuming version ${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH}." )
endif ( )
# c h e c k w h e t h e r t h e r e i s a label ( 'alpha', 'pre', etc. )
# c h e c k w h e t h e r t h e r e i s a label ( 'alpha', 'pre', etc. )
if ( "${STORM_VERSION_LABEL}" STREQUAL "" )
if ( "${STORM_VERSION_LABEL}" STREQUAL "" )
set ( STORM_VERSION_LABEL_STRING "" )
set ( STORM_VERSION_LABEL_STRING "" )