Try this in your top level CMakeLists.txt file:
FIND_PACKAGE(Subversion)
IF(Subversion_FOUND)
Subversion_WC_INFO("${CMAKE_CURRENT_SOURCE_DIR}" myproj)
MESSAGE(STATUS "myproj_WC_REVISION='${myproj_WC_REVISION}'")
ENDIF(Subversion_FOUND)
WC == working copy
See the macro definition of Subversion_WC_INFO in CMake's
Modules/FindSubversion.cmake for more info.
HTH,
David
On Mon, Mar 31, 2008 at 8:52 PM, Andrew Maclean <[EMAIL PROTECTED]>
wrote:
> We want to coordinate versioning with our subversion repository. Has
> anyone done this with CMake?
>
> There is a file called .svn\entries and the fourth line in that file has a
> version number e.g. 660. I am thinking of somehow picking up this number
> and creating a variable to use in our builds.
> Or is there a cleverer way of doing this?
>
> Andrew
>
>
> --
> ___________________________________________
> Andrew J. P. Maclean
> Centre for Autonomous Systems
> The Rose Street Building J04
> The University of Sydney 2006 NSW
> AUSTRALIA
> Ph: +61 2 9351 3283
> Fax: +61 2 9351 7474
> URL: http://www.acfr.usyd.edu.au/
> ___________________________________________
>
> _______________________________________________
> CMake mailing list
> [email protected]
> http://www.cmake.org/mailman/listinfo/cmake
>
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake