MantisBT - CMake
View Issue Details
0015388CMakeCMakepublic2015-02-03 12:552015-07-08 08:57
Martin Beaudoin 
 
normaltweakalways
closedno change required 
 
 
0015388: CTEST_GIT_UPDATE_CUSTOM is not handled by CTest.cmake
It would be nice to be able to use the option CTEST_GIT_UPDATE_CUSTOM from a CMakeLists.txt file.

Right now, only the GIT_UPDATE_OPTIONS option is handled by the module CTest.cmake.
The option CTEST_GIT_UPDATE_CUSTOM is basically ignored by the module CTest.cmake.

So one has to modify the DartConfiguration.tcl directly in order to specify a GITUpdateCustom entry prior to invoke "make Nightly" or "make NightlyUpdate".

I am willing to work on/contribute a patch if you are interested by this useful tweak.
The syntax one has to specify for the CTEST_GIT_UPDATE_CUSTOM option is also a bit peculiar.

My "Custom GIT Update" command is simply : "/usr/bin/git merge origin/master"

Still, here is the syntax one will need to use to set the proper value for GITUpdateCustom in the DartConfiguration.tcl:

/usr/bin/git;merge;origin/master

I don't mind this compact syntax which is probably necessary in order to supply a multi-token entry that will be recognized for the key/value syntax of the DartConfiguration.tcl file.

But if this information is ever taken from a CMakeLists.txt file, it would be nice to support at this higher level a user-friendly syntax like this:

SET(CTEST_GIT_UPDATE_CUSTOM "/usr/bin/git merge origin/master" ....)
No tags attached.
Issue History
2015-02-03 12:55Martin BeaudoinNew Issue
2015-02-03 13:33Brad KingNote Added: 0037892
2015-02-03 15:41Martin BeaudoinNote Added: 0037896
2015-02-03 16:17Brad KingNote Added: 0037897
2015-02-18 15:48Martin BeaudoinNote Added: 0037995
2015-02-18 15:55Brad KingNote Added: 0037996
2015-02-18 15:55Brad KingStatusnew => resolved
2015-02-18 15:55Brad KingResolutionopen => no change required
2015-07-08 08:57Robert MaynardNote Added: 0039053
2015-07-08 08:57Robert MaynardStatusresolved => closed

Notes
(0037892)
Brad King   
2015-02-03 13:33   
If anyone works on a patch for this, the "user-friendly" style would simply be:

 set(CTEST_GIT_UPDATE_CUSTOM /usr/bin/git merge origin/master ....)

because that would compose the command-line into a ;-list anyway.
(0037896)
Martin Beaudoin   
2015-02-03 15:41   
Ok. So we lose the double-quotes for the variable value. No problem.

If you don't mind, I will give it a try myself, and send you the patch if successful.
At first glance, it looks simple enough.
(0037897)
Brad King   
2015-02-03 16:17   
Re 0015388:0037896: Great, thanks. Please also modify "Help/manual/ctest.1.rst" to add the settings to the "Dashboard Client Configuration" section.
(0037995)
Martin Beaudoin   
2015-02-18 15:48   
It turns out the problem was located inside my own CMakeLists.txt file.

The variable CTEST_GIT_UPDATE_CUSTOM is indeed fully recognized by cmake, and the corresponding entry is correctly written into the file DartConfiguration.tcl.

Furthermore, the variable is already correctly documented in "Help/manual/ctest.1.rst".

So this issue can be closed immediately. Sorry for the noise.
(0037996)
Brad King   
2015-02-18 15:55   
Okay, thanks for reporting back.
(0039053)
Robert Maynard   
2015-07-08 08:57   
Closing resolved issues that have not been updated in more than 4 months.