[CMake] CMakeCache changing due to PDB

Ashwin Chandra achandra at panologic.com
Sat Aug 1 12:57:16 EDT 2009


Thanks Brad. 

Please note that I think it is related to precompiled headers. The pch file seems to always make the pdb lowercase but without this, I don't believe it is an issue. 



From: Brad King
Sent: Sat 8/1/2009 5:44 AM
To: Ashwin Chandra
Cc: cmake at cmake.org; Bill Hoffman
Subject: Re: [CMake] CMakeCache changing due to PDB


Ashwin Chandra wrote:
> Notice the pdb file changed in case. I think what is happening is that 
> the compiler is generating the pdb file in all lower case on the first 
> build run and when doing a second build run, it somehow knows the file 
> is in lowercase now and it updates the build.make files (which in turn 
> tells cmake and visual studio compiler to do the linking phase over 
> again).  Note that a third or more builds work fine (no relinking).

Good analysis.

> Is there anyway to have the build.make file always generate the pdb 
> section in lowercase? Where does it get the case of the file anyway?

CMake generates the rules using the case of the logical target name.
However, most paths that CMake processes on Windows go through a
"get actual case" function which tries to preserve the case of the
file as seen on disk.  The first time the file doesn't exist, so
CMake just uses the case it intends.  The second time the file does
exist, so the "get actual case" works and switches the case.

It's kind of the compiler's fault for not preserving the case it
is given in the /Fd option, but it is up to CMake to deal with it.
We'll have to be more careful about which paths go through the
"get actual case" function.  Only files that are inputs to the
build should go through it, while files generated by the build
should not.  Please submit this here:

http://www.cmake.org/Bug

Thanks,
-Brad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090801/97c9ba06/attachment.htm>


More information about the CMake mailing list