Permalink
Browse files

Parse the BALL version from CMakeLists.txt

This change allows us to make BALL.doc a template for cmake
  • Loading branch information...
dstoeckel committed Feb 24, 2011
1 parent 9ee017d commit 48b4c881c081c3109028252c479c116454c9d47f
Showing with 6 additions and 2 deletions.
  1. +6 −2 autobuild
View
@@ -70,8 +70,12 @@ askContrib()
exit 11
fi
else if [ "$INST" = "No" ]; then
- export VERSION=`cat "include/BALL/BALL.doc" | grep version | sed "s/.version//" | tr -d ' ' | tr -d '\t'`
- echo Assuming version is:$VERSION ....
+ MAJOR_VERSION=`grep ^SET\(BALL_PACKAGE_VERSION_MAJOR "CMakeLists.txt" | sed 's/.*\"\([0-9]*\)\".*/\1/'`
+ MINOR_VERSION=`grep ^SET\(BALL_PACKAGE_VERSION_MINOR "CMakeLists.txt" | sed 's/.*\"\([0-9]*\)\".*/\1/'`
+ PATCH_VERSION=`grep ^SET\(BALL_PACKAGE_VERSION_PATCH "CMakeLists.txt" | sed 's/.*\"\([0-9]*\)\".*/\1/'`
+ export VERSION="${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}"
+
+ echo Assuming version is: $VERSION ....
if [ "$OS" != Darwin ]
then
PACKAGE=${PREFIX}"-"${VERSION}".tar.gz"

0 comments on commit 48b4c88

Please sign in to comment.