View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014158CMakeCMakepublic2013-05-20 07:482013-10-07 10:09
ReporterBerkus 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionduplicate 
PlatformWindowsOSWindowsOS VersionWin7, Win8
Product VersionCMake 2.8.10.2 
Target VersionFixed in Version 
Summary0014158: CMake generated project doesn't create PDB files in the right place.
DescriptionWe have a somewhat non-standard configuration where to save build time we generate OBJECT library and then assemble a final library out of $<TARGET_OBJECTS> of that library.

The minimal reproducible example is posted on https://github.com/berkus/cmake-pdb [^]

During compile files of the OBJECT sub-library seem to receive invalid /Fd option which specifies PDB file location, which leads to the following during linking:
outerlib.lib(lib2.obj) : warning LNK4099: PDB 'vc110.pdb' was not found with 'outerlib.lib(lib2.obj)' or at 'C:\Users\***\Documents\cmake-pdb\_build_\_exe_\Debug\vc110.pdb'; linking object as if no debug info

I don't know if this is intended behavior or not, but all my attempts to fix this even manually were futile - cmake overrides /Fd setting.

Please advise how this can be fixed (either in cmake or in our code).
Steps To ReproduceYou can easily reproduce the case by checking out the repo and following the steps outlined in the README.txt file.

Tested in VS2010 and VS2012.
Additional Information       ClCompile:
         C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\CL.exe /c /Zi /nologo /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"innerlib_internal.dir\Debug\\" /Fd"innerlib_internal.dir\Debug\vc110.pdb" /Gd /TP /analyze- /errorReport:prompt /Zm1000 "C:\Users\***\Documents\cmake-pdb\lib\lib2.cpp"
         lib2.cpp

while for outerlib.lib lib1.cpp PDB proper file name is specified:

       ClCompile:
         C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\CL.exe /c /Zi /nologo /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"outerlib.dir\Debug\\" /Fd"C:/Users/***/Documents/cmake-pdb/_build_/_lib_/Debug/outerlib.pdb" /Gd /TP /analyze- /errorReport:prompt /Zm1000 "C:\Users\***\Documents\cmake-pdb\lib\lib1.cpp"
         lib1.cpp
Tagsmsvc
Attached Files

 Relationships
duplicate of 0014062closedBrad King Setting Compiler and Linker PDB to the same path in Visual Studio is unsupported. 

  Notes
(0033100)
Brad King (manager)
2013-05-20 08:48

Please see issues 0011899, 0014062, and this recent fix:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=42ba1b08 [^]

Does that resolve this issue?
(0033119)
Berkus (reporter)
2013-05-23 07:26

It seems to fix the issues we had.

To make it simpler in maintenance we have switched to using /Z7 and no PDB files though.

This report can be closed.
(0033120)
Brad King (manager)
2013-05-23 08:33

Great, thanks for reporting back.
(0034058)
Robert Maynard (manager)
2013-10-07 10:09

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

 Issue History
Date Modified Username Field Change
2013-05-20 07:48 Berkus New Issue
2013-05-20 07:49 Berkus Tag Attached: msvc
2013-05-20 08:48 Brad King Note Added: 0033100
2013-05-23 07:26 Berkus Note Added: 0033119
2013-05-23 08:33 Brad King Relationship added duplicate of 0014062
2013-05-23 08:33 Brad King Note Added: 0033120
2013-05-23 08:33 Brad King Status new => resolved
2013-05-23 08:33 Brad King Resolution open => duplicate
2013-10-07 10:09 Robert Maynard Note Added: 0034058
2013-10-07 10:09 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team