[CMake] ctest_update with git fetch --tags (was: ctest & git submodules)
NoRulez
norulez at me.com
Thu Feb 28 12:35:44 EST 2013
Thank you very much.
The goal is to have a nightly/continuous build with the tagged version number.
Without the "--tags" option it is only working if we push the changes after tagging.
With the "--tags" option it is now also possible to move/overwrite tags which gets then updated.
In the projects CMakeLists.txt file we get the current tag/version with "git describe --tags"
Maybe there would be alternatives but currently this is working fine. But we are open for suggestions.
Best Regards
Am 28.02.2013 um 17:38 schrieb Brad King <brad.king at kitware.com>:
> On 02/28/2013 11:11 AM, NoRulez wrote:
>> I've attached the two log files, can you take a look on it?
>
> After running "git fetch" CMake reads .git/FETCH_HEAD to determine
> what branch is intended for merge (just as pull does). This is the
> same as "git pull --tags" failing. You need to specify the remote
> and branch explicitly to use pull with --tags:
>
> set(CTEST_GIT_UPDATE_OPTIONS "--tags origin master")
>
> CMake cannot add this automatically because the entire point of
> reading FETCH_HEAD is that CMake does not try to parse the git
> config to learn this information.
>
> What is your goal of using --tags? The ctest_update command's job
> is to follow a tracking branch. What do tags have to do with that?
>
> -Brad
More information about the CMake
mailing list