RE: [CMake] Version embedding - how to cause a command when make is run?

2007-10-05 Thread Atwood, Robert C
> -Original Message- > From: Juan Sanchez > Not being a member of the subversion list. And doubting that > non cmake > members can email this list. Please email us the results of > your query Okay, if people don't think it irrelevant to Cmake. I'm sensitive to the fact this discussi

ADD_CUSTOM_TARGET question (was RE: [CMake] Version embedding - how to cause a command when make is run?)

2007-10-05 Thread Atwood, Robert C
Hi: I think I've got it (the CMAKE bit, for whichever svn command is eventually used) nearly ... > -Original Message- > From: Alan W. Irwin [mailto:[EMAIL PROTECTED] > Sent: 04 October 2007 18:07 > If that is more information than you want in your executables, then to > answer your ori

Re: [CMake] Version embedding - how to cause a command when make is run?

2007-10-05 Thread Juan Sanchez
Not being a member of the subversion list. And doubting that non cmake members can email this list. Please email us the results of your query to the subversion list. Juan David Cole wrote: > Looks to me like the output of "svn status -u" will give you something like... > Status against revision

Re: [CMake] Version embedding - how to cause a command when make is run?

2007-10-05 Thread David Cole
Looks to me like the output of "svn status -u" will give you something like... Status against revision: 1234 ... when everything is up to date with respect to "svn info". And it will give something like... *1001 FileAtPrevRevision.cxx Status against revision: 1234 ... when there is

Re: [CMake] Version embedding - how to cause a command when make is run?

2007-10-05 Thread Juan Sanchez
Ok, My code was for demonstration purposes only. Of course there are more generic ways to process the information, perhaps even using CMake itself. A google search reveals that the last line from "svn status -q " is often used to get the latest revision number. In the search for knowledge, it i

RE: [CMake] Version embedding - how to cause a command when make is run?

2007-10-05 Thread Atwood, Robert C
Hi: > How about: > > svn info file:///home/juans/svn_repository/svnroot/ | grep > '^Revision:' > | sed -e 's/^[^0-9]*//' I don't really like the idea of too much shell-filtering for this (or similar) purpose. The necessity of such indicates either there's a feature that people want, that's la

Re: [CMake] Version embedding - how to cause a command when make is run?

2007-10-05 Thread Juan Sanchez
How about: svn info file:///home/juans/svn_repository/svnroot/ | grep '^Revision:' | sed -e 's/^[^0-9]*//' on the repository. Or just: svn info | grep '^Revision:' | sed -e 's/^[^0-9]*//' After doing a svn update, the latest revision on the url seems to be accurate. Unfortunately the number

Re: [CMake] Version embedding - how to cause a command when make is run?

2007-10-05 Thread David Cole
How about "svn status -u" or a filtered version of "svn status -v" ? On 10/5/07, Atwood, Robert C <[EMAIL PROTECTED]> wrote: > I hope its okay to copy this to Subversion list, as it has veered away > from cmake ... > > Alan said (on Cmake list): > > > take a concrete but simple example, suppo

RE: [CMake] Version embedding - how to cause a command when make is run?

2007-10-05 Thread Atwood, Robert C
I hope its okay to copy this to Subversion list, as it has veered away from cmake ... Alan said (on Cmake list): > take a concrete but simple example, suppose you have five > files which all > have 3 possibilities (1,2,3) for the revision number. IOW, > each file changed > for each revision. T

Re: [CMake] Version embedding - how to cause a command when make is run?

2007-10-05 Thread David Cole
As Alan points out, you shouldn't trust the output of "svn info" as gospel unless you also verify that "svn status" gives you *empty* output. In the case that Alan identifies of trying to track down where a bug was introduced, a quick svn status check would show you which files were *not* up to da

RE: [CMake] Version embedding - how to cause a command when make is run?

2007-10-05 Thread Alan W. Irwin
On 2007-10-05 14:28+0100 Atwood, Robert C wrote: >> From: Alan W. Irwin (on cmake list) Yes, [svnversion] is the whole point! It is much easier than using individual revision nubmers for each file. Although not nearly as informative. I just tried svnversion, and it only gives a range of

RE: [CMake] Version embedding - how to cause a command when make is run?

2007-10-05 Thread Atwood, Robert C
>> From: Alan W. Irwin (on cmake list) > > Yes, [svnversion] is the whole point! It is much easier > than using individual > > revision nubmers for each file. > > Although not nearly as informative. I just tried svnversion, > and it only > gives a range of Revision numbers for the source tre

RE: [CMake] Version embedding - how to cause a command when make is run?

2007-10-04 Thread Alan W. Irwin
On 2007-10-04 18:20+0100 Atwood, Robert C wrote: From: Alan W. Irwin [...]I've tried the following in CMakeLists, placing the output of 'svnversion' and similar commands into an included source file and it works [...] Can some form of dependency be set so that if any source file is chan

Re: [CMake] Version embedding - how to cause a command when make is run?

2007-10-04 Thread Omar Souka
On 10/4/07, Atwood, Robert C <[EMAIL PROTECTED]> wrote: > > Hi: > I have applied Cmake to a pre-existing project that used to use plain > make-files that I crafted with great amounts of hair-tearing, and so far > cmake was relatively easy and I am now a convert :=> Maybe my hair will > even grow ba

RE: [CMake] Version embedding - how to cause a command when make is run?

2007-10-04 Thread Atwood, Robert C
> From: Alan W. Irwin > > [...]I've tried the following in CMakeLists, placing the output of > > 'svnversion' and similar commands into an included source > file and it > > works [...] > > > Can some form of dependency be set so that if any source file is > > changed [...] > > > Or, should I

Re: [CMake] Version embedding - how to cause a command when make is run?

2007-10-04 Thread Alan W. Irwin
On 2007-10-04 15:34+0100 Atwood, Robert C wrote: [...]I've tried the following in CMakeLists, placing the output of 'svnversion' and similar commands into an included source file and it works [...] Can some form of dependency be set so that if any source file is changed [...] Or, should I