[cmake-developers] [CMake 0014158]: CMake generated project doesn't create PDB files in the right place.
Mantis Bug Tracker
mantis at public.kitware.com
Mon May 20 07:48:03 EDT 2013
The following issue has been SUBMITTED.
======================================================================
http://cmake.org/Bug/view.php?id=14158
======================================================================
Reported By: Berkus
Assigned To:
======================================================================
Project: CMake
Issue ID: 14158
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2013-05-20 07:48 EDT
Last Modified: 2013-05-20 07:48 EDT
======================================================================
Summary: CMake generated project doesn't create PDB files in
the right place.
Description:
We 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 Reproduce:
You 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
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2013-05-20 07:48 Berkus New Issue
======================================================================
More information about the cmake-developers
mailing list