View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009350CMakeCMakepublic2009-08-01 13:092009-09-17 08:44
Reporterachandra 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0009350: CMakeCache being regenerated due to case of PDB files (visual studio compiler)
DescriptionIf I initiate a cmake build twice in a row (from clean state), the second time it does re-linking of files all over again. I have traced the problem and found that the build.make files in each project dir have changed. The only changes are the case of the PDB file. For example:

“$(CXX_FLAGS) $(CXX_DEFINES) /TP /FoCMakeFiles\CompressedTile_TestRunner.dir\CompressedTile_TestRunner.cpp.obj /FdC:\trunk\Debug\wxp_x86\bin\compressedtile_testrunner.pdb -c C:\trunk\Debug\wxp_x86\atto\common\CompressedTile_TestRunner.cpp”

Vs

“$(CXX_FLAGS) $(CXX_DEFINES) /TP /FoCMakeFiles\CompressedTile_TestRunner.dir\CompressedTile_TestRunner.cpp.obj /FdC:\trunk\Debug\wxp_x86\bin\CompressedTile_TestRunner.pdb -c C:\trunk\Debug\wxp_x86\atto\common\CompressedTile_TestRunner.cpp”

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).

It seems like CMake uses the case of the project name the first time and then a getcase of the file path the second time...
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0017420)
Bill Hoffman (manager)
2009-09-14 09:40

What generator is this? nmake?
(0017424)
achandra (reporter)
2009-09-14 11:35

Yes Nmake.
(0017427)
Brad King (manager)
2009-09-14 11:58

Sorry I didn't respond to this report sooner. It was just assigned to me so I never knew you submitted it. For reference, here is a link to our discussion on the mailing list:

http://www.cmake.org/pipermail/cmake/2009-August/031104.html [^]
(0017428)
Brad King (manager)
2009-09-14 12:00

As I mentioned on the mailing list, I need to make a sweep through the code to make sure we only get the "actual case" for a file path for input files. Hopefully I'll find time to get to this soon.
(0017584)
Brad King (manager)
2009-09-17 08:44

Since the PDB files seem to be the only ones whose case gets changed by native tools, they are the most likely to be problematic. I've committed a fix that avoids the "actual case" lookup for PDB files. This should be sufficient to deal with this issue.

Do not call CollapseFullPath for PDB file names
/cvsroot/CMake/CMake/Source/cmMakefileExecutableTargetGenerator.cxx,v <-- Source/cmMakefileExecutableTargetGenerator.cxx
new revision: 1.62; previous revision: 1.61
/cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v <-- Source/cmMakefileLibraryTargetGenerator.cxx
new revision: 1.78; previous revision: 1.77
/cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v <-- Source/cmMakefileTargetGenerator.cxx
new revision: 1.122; previous revision: 1.121

 Issue History
Date Modified Username Field Change
2009-08-01 13:09 achandra New Issue
2009-09-14 09:40 Bill Hoffman Note Added: 0017420
2009-09-14 09:40 Bill Hoffman Status new => assigned
2009-09-14 09:40 Bill Hoffman Assigned To => Bill Hoffman
2009-09-14 11:35 achandra Note Added: 0017424
2009-09-14 11:52 Bill Hoffman Assigned To Bill Hoffman => Brad King
2009-09-14 11:58 Brad King Note Added: 0017427
2009-09-14 12:00 Brad King Note Added: 0017428
2009-09-17 08:44 Brad King Note Added: 0017584
2009-09-17 08:44 Brad King Status assigned => closed
2009-09-17 08:44 Brad King Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team