View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014667CMake(No Category)public2013-12-23 08:072014-10-06 10:33
Reporternjeisecke 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformWindowsOSWindowsOS Version7
Product VersionCMake 2.8.12 
Target VersionCMake 2.8.12.2Fixed in VersionCMake 2.8.12.2 
Summary0014667: MSVC compiler PDB change breaks PCH support (with minimal testcase)
DescriptionThe change http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=42ba1b08 [^] added a compiler switch "/Fd<OBJECT_DIR>".

When using precompiled headers this will now cause errors like:

C:\projects\cmakepch\subdir\test2.cpp(1) : error C2859: c:\projects\cmakepch\build\cmakefiles\test.dir\subdir\vc90.pdb is not the pdb file that was used when this precompiled header was created, recreate the precompiled header.

This occurs for all source files not on the same level as the compiled header object file because msvc is now told to use the pdb in the object directory.

Explicitly setting /Fd does not help because that's overridden by cmake.
Steps To Reproduceplease check the attached minimal testcase.
Additional Informationworks in 2.8.10.2 but not in 2.8.12.
TagsNo tags attached.
Attached Fileszip file icon cmakepch.zip [^] (4,593 bytes) 2013-12-23 08:07

 Relationships
related to 0014876closedKitware Robot Improve support for TI compiler 

  Notes
(0034856)
Brad King (manager)
2013-12-23 10:04
edited on: 2014-01-02 13:49

Thanks for the clear report and explanation of this regression.

The problem is that the <OBJECT_DIR> replacement is supposed to point at a single intermediate files directory for all objects in a target but for compile lines it instead points to the directory containing the current object file. This should fix it:

 Replace <OBJECT_DIR> rule placeholder consistently
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=03f3b4e7 [^]

With the consistent replacement then the same compiler program database (vc90.pdb) location should be used for all compilations in a single target.

(0036973)
Robert Maynard (manager)
2014-10-06 10:33

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2013-12-23 08:07 njeisecke New Issue
2013-12-23 08:07 njeisecke File Added: cmakepch.zip
2013-12-23 10:04 Brad King Note Added: 0034856
2013-12-23 10:04 Brad King Assigned To => Brad King
2013-12-23 10:04 Brad King Status new => resolved
2013-12-23 10:04 Brad King Resolution open => fixed
2013-12-23 10:04 Brad King Fixed in Version => CMake 2.8.12.2
2013-12-23 10:04 Brad King Target Version => CMake 2.8.12.2
2013-12-23 10:05 Brad King Note Edited: 0034856
2014-01-02 13:49 Brad King Note Edited: 0034856
2014-04-15 08:45 Brad King Relationship added related to 0014876
2014-10-06 10:33 Robert Maynard Note Added: 0036973
2014-10-06 10:33 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team