Try this in your top level CMakeLists.txt file:<div><br></div><div>FIND_PACKAGE(Subversion)</div><div>IF(Subversion_FOUND)</div><div> Subversion_WC_INFO("${CMAKE_CURRENT_SOURCE_DIR}" myproj)</div><div> MESSAGE(STATUS "myproj_WC_REVISION='${myproj_WC_REVISION}'")</div>
<div><div>ENDIF(Subversion_FOUND)</div><div><br></div>WC == working copy</div><div><br></div><div>See the macro definition of Subversion_WC_INFO in CMake's Modules/FindSubversion.cmake for more info.</div><div><br></div>
<div><br></div><div>HTH,</div><div>David</div><div><br></div><div><br><div class="gmail_quote">On Mon, Mar 31, 2008 at 8:52 PM, Andrew Maclean <<a href="mailto:andrew.amaclean@gmail.com">andrew.amaclean@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>We want to coordinate versioning with our subversion repository. Has anyone done this with CMake?</div>
<div> </div>
<div>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.</div>
<div>Or is there a cleverer way of doing this?</div>
<div> </div>
<div>Andrew</div>
<div><br clear="all"><br>-- <br>___________________________________________<br>Andrew J. P. Maclean<br>Centre for Autonomous Systems<br>The Rose Street Building J04<br>The University of Sydney 2006 NSW<br>AUSTRALIA<br>Ph: +61 2 9351 3283<br>
Fax: +61 2 9351 7474<br>URL: <a href="http://www.acfr.usyd.edu.au/" target="_blank">http://www.acfr.usyd.edu.au/</a><br>___________________________________________ </div>
<br>_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></div>