Skip to content

Commit 48b4c88

Browse files
committedFeb 24, 2011
Parse the BALL version from CMakeLists.txt
This change allows us to make BALL.doc a template for cmake
1 parent 9ee017d commit 48b4c88

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎autobuild

+6-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,12 @@ askContrib()
7070
exit 11
7171
fi
7272
else if [ "$INST" = "No" ]; then
73-
export VERSION=`cat "include/BALL/BALL.doc" | grep version | sed "s/.version//" | tr -d ' ' | tr -d '\t'`
74-
echo Assuming version is:$VERSION ....
73+
MAJOR_VERSION=`grep ^SET\(BALL_PACKAGE_VERSION_MAJOR "CMakeLists.txt" | sed 's/.*\"\([0-9]*\)\".*/\1/'`
74+
MINOR_VERSION=`grep ^SET\(BALL_PACKAGE_VERSION_MINOR "CMakeLists.txt" | sed 's/.*\"\([0-9]*\)\".*/\1/'`
75+
PATCH_VERSION=`grep ^SET\(BALL_PACKAGE_VERSION_PATCH "CMakeLists.txt" | sed 's/.*\"\([0-9]*\)\".*/\1/'`
76+
export VERSION="${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}"
77+
78+
echo Assuming version is: $VERSION ....
7579
if [ "$OS" != Darwin ]
7680
then
7781
PACKAGE=${PREFIX}"-"${VERSION}".tar.gz"

0 commit comments

Comments
 (0)
Please sign in to comment.