Commit 98fbce3b authored by Bob Obara's avatar Bob Obara

ENH: Added a version.txt file

This contains the version of CMB - this also now sets the CMB Version Variables
parent e66d3370
set(CMB_VERSION_MAJOR 4)
set(CMB_VERSION_MINOR 0)
set(CMB_VERSION_PATCH 0-develop)
set(CMB_VERSION "4.0")
file(STRINGS ../version.txt version_string )
string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)[-]*(.*)"
version_matches "${version_string}")
set(CMB_VERSION_MAJOR ${CMAKE_MATCH_1})
set(CMB_VERSION_MINOR ${CMAKE_MATCH_2})
set(CMB_VERSION_PATCH "${CMAKE_MATCH_3}")
# Do we just have a patch version or are there extra stuff?
if (CMAKE_MATCH_4)
set(CMB_VERSION_PATCH "${CMAKE_MATCH_3}-${CMAKE_MATCH_4}")
endif()
set(CMB_VERSION "${CMB_VERSION_MAJOR}.${CMB_VERSION_MINOR}")
4.1.0-RC1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment