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

norulez norulez at me.com
Fri Sep 17 14:11:39 EDT 2010


Thanks,

but could it be that FindGit.cmake isn't complete?

Because i tried Git_WC_INFO and i get an Unknown CMake command error. Or is the command for git different?

Best Regards

Am 17.09.2010 um 17:50 schrieb Alexander Neundorf <a.neundorf-work at gmx.net>:

> 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
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list