[CMake] [SUBVERSION] Retrieve details of your working copy

Brad King brad.king at kitware.com
Thu Oct 26 11:48:41 EDT 2006


Tristan Carel wrote:
> To use it:
> ### Extract information from the current subversion working copy
> INCLUDE(UseSubversion.cmake)
> IF(SUBVERSION_SVN_FOUND)
>  SUBVERSION_REPOSITORY(${PROJECT_SOURCE_DIR})
> ENDIF(SUBVERSION_SVN_FOUND)

This looks like a nice module.  You should be able to convert it to a
find module to improve the interface since it just finds an executable
and provides a macro.  Try renaming the module to FindSubversion.cmake
and following the conventions specified in the Modules/readme.txt file
in the CMake source tree.  Then you should be able to do

FIND_PACKAGE(Subversion)
IF(SUBVERSION_FOUND)
  SUBVERSION_REPOSITORY(${PROJECT_SOURCE_DIR})
ENDIF(SUBVERSION_FOUND)

If you get this working please post the module for further review and
we'll look at putting it in upstream cmake.

Thanks,
-Brad


More information about the CMake mailing list