[CMake] Portable revision lookup?
Oliver kfsone Smith
osmith at playnet.com
Thu Feb 2 16:10:32 EST 2012
Right now I wrap my Linux-based build process with a script that
features the line
REVISION=`svn info ${SRC_PATH} | awk '/^Revision/ { print $2 }'`
Which is neither OS or VCS portable.
I'm trying to put together a CPack configuration to make the builds, and
I'd like to name the resulting installer for the revision it was built from.
Is there any kind of built-in mechanism I can use for this, or would I
be best just using IFs and executing os-specific commands? (I'm not
quite sure how I'm going to pluck the info out under Windows)
I'm also wondering if there is a way to query other repository
attributes - specifically the URL - I'd like to build installers named
<product>.<branch>.<revision>.<suffix>
e.g.
my-client.baseline.57721.deb
or
my-server.branches.1.35.57804.tbz2
Any pointers?
- Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120202/d3462fd6/attachment-0001.htm>
More information about the CMake
mailing list