[CMake] Timestamps...

William A. Hoffman billlist at nycap.rr.com
Thu Oct 28 10:50:46 EDT 2004


That is strange.   BTW, it would seem that cmake is now building the rc files for you?
At one point you had said this was not working, what was the problem?

There may be a bug in the cmake copy.  You should try replacing it with a call to the
windows copy to see if it works different.  Also, you could try running the commands by hand.
You can also do nmake VERBOSE=1 and make sure the commands are running in the order you think they
are.

I just tried the following and it seems to work on my machine:

$ ./bin/cmake -E copy CMakeCache.txt CMakeCache.txt.2; ./bin/cmake -E copy CMak
eCache.txt.2 CMakeCache.txt.3

Hoffman at VOGON ~/My Builds/CMakeVSNMake71
$ ls -ltr CMakeCache.txt*
-rwxr-xr-x    1 Hoffman  None        23046 Oct 28 00:30 CMakeCache.txt
-rwxr-xr-x    1 Hoffman  None        23046 Oct 28 10:49 CMakeCache.txt.2
-rwxr-xr-x    1 Hoffman  None        23046 Oct 28 10:49 CMakeCache.txt.3

The order of the files is correct, (ls -ltr orders oldest to newest)

What happens if you try that on your machine?

-Bill


At 02:12 AM 10/28/2004, Lars Pechan wrote:
>Hi there,
>I have little timestamp problem that I can't get my head around. This is what happens:
>
>1) I have an out-of-source build directory called "buildroot".
>2) Buildroot is quite a big tree (which shouldn't make any difference).
>3) In order to build a particular library in buildroot I need to copy in an rc-file ("app.rc") to two locations: buildroot/X/app.rc and buildroot/Y/app.rc.. (Legacy reasons -- don't ask...)
>4) I first copy it to buildroot/X/app.rc
>5) It then gets copied into buildroot/Y/app.rc.
>6) (The copying is done via custom commands where buildroot/Y/app.rc depends on buildroot/X/app.rc).
>7) This all works fine but this rule is nearly always firing!!
>8) Looking at the timestamps I see that the buildroot/Y/app.rc is older than buildroot/X/app.rc!! Ie the copy is older than its original?? The difference is about one second. This happens most of the time but not always? Sometimes the source is older as it should be.
>9) (The copying is driven by a request for buildroot/Y/app.rc but in order for that to happen the file has to be copied over to buildroot/X/app.rc first)
>
>My question:  Either I have completely lost my marbles or there is some dodgy race condition here?
>
>Any ideas?
>
>/Lars
>
>_______________________________________________
>CMake mailing list
>CMake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list