[CMake] Dealing with down servers when using FindSubversion.cmake

John Drescher drescherjm at gmail.com
Mon Jun 13 15:21:13 EDT 2011


On Mon, Jun 13, 2011 at 3:16 PM, Rolf Eike Beer <eike at sf-mail.de> wrote:
> Am Montag, 13. Juni 2011, 13:02:34 schrieb John Drescher:
>> I use code like the following to append a version to my applications
>> based on the current svn rev.
>>
>> FIND_PACKAGE(Subversion)
>> IF(Subversion_FOUND)
>>       Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
>>       MESSAGE("Current revision is ${Project_WC_REVISION}")
>>       Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project)
>>       MESSAGE("Last changed log is ${Project_LAST_CHANGED_LOG}")
>>       set (${PROJECT_NAME}_VERSION_PATCH
>> ${${PROJECT_NAME}_VERSION_PATCH}.${Project_WC_REVISION})
>> ENDIF(Subversion_FOUND)
>>
>> The problem is if the server is down it prevented me from working
>> since the failure to get a version ends up blocking the generate so I
>> added an option to disable the appending if I disable the option:
>
> I think your problem is not the version, but the log. The log is fetched from
> the server, the revisions of the files are stored inside the working copy and
> therefore are available offline, too. Just remove that log thing.
>
Thanks, I will try that. I am trying to remember why I put the log
part in there. I know it was nice to see the last commit in the
cmake-gui but if that holds me up no reason for that..

John


More information about the CMake mailing list