[CMake] How to determine which working copy is present?

Alexander Neundorf a.neundorf-work at gmx.net
Fri Sep 17 11:50:28 EDT 2010


On Friday 17 September 2010, norulez wrote:
> Hello,
>
> is there a way in cmake to determine if it is a svn or git working copy to
> use the individual commands?
>
> Such as:
>
> If svn then FindPackage(Svn).....
> Else if git then FindPackage(Git)...

something like the following should work:
if(EXISTS ${CMAKE_SOURCE_DIR}/.svn )
...

Alex


More information about the CMake mailing list