[CMake] Timestamps... SOLVED

Lars Pechan lars.pechan at parkerpechan.com
Thu Oct 28 17:14:48 EDT 2004


Don't worry, it's the old SBK syndrome once again. (S**t Behind the 
Keyboard).

What I failed to realise yesterday was that there was another custom 
build step that I was convinced was completely benign but after a good 
night's sleep and some testing I realised that it actually re-copied 
the files back from destination to source. (This re-copying is done by 
an executable, not directly by the custom build step).

Sorry for wasting everyones time.

Re: resources. I am able to create resource dlls now both with static 
(pre-existing) and generated rc-files. The case I described in the 
other mail still doesn't work properly (the NMake generator accepts it 
but the VS.NET 2003 generator produces a vcproj-file that is 
subsequently rejected by VS.NET when I open the sln-file. I'll 
hopefully be investigating this further today.

Thanks,

/Lars

On 29/10/2004, at 3:50 AM, William A. Hoffman wrote:

> 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