View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014600 | CMake | CMake | public | 2013-11-26 20:22 | 2014-10-06 10:32 | ||||
Reporter | Charles Karney | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 2.8.12 | ||||||||
Target Version | CMake 3.0 | Fixed in Version | CMake 3.0 | ||||||
Summary | 0014600: Document PDB behavior w.r.t. static libraries | ||||||||
Description | I'm building using cmake 2.8.11 with the Visual Studio 10 Generator and src/CMakeLists.txt contains set_target_properties (${PROJECT_STATIC_LIBRARIES} PROPERTIES VERSION "${LIBVERSIONFULL}" OUTPUT_NAME GeographicLib PDB_NAME GeographicLib_STATIC) After building I have <build-dir>/src/DEBUG/GeographicLib_STATIC.pdb alongside my .lib file as expected. (Actually it's geographiclib_static.pdb, but never mind about that.) A colleague is using cmake 2.8.12 with my project and for him the pdb file is buried as <build-dir>/src/GeographicLib_STATIC.dir/Dedug/vc100.pdb I.e., the directory and the name are wrong. This bug was introduced between 2.8.11 and 2.8.12. The following deletion seems to be responsible. --- cmake-2.8.11/Source/cmVisualStudio10TargetGenerator.cxx 2013-05-15 13:38:13.000000000 -0400 +++ cmake-2.8.12/Source/cmVisualStudio10TargetGenerator.cxx 2013-10-07 11:31:00.000000000 -0400 @@ -1260,18 +1409,7 @@ clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", "\n", "CXX"); - this->WriteString("<AssemblerListingLocation>", 3); - *this->BuildFileStream << configName - << "</AssemblerListingLocation>\n"; this->WriteString("<ObjectFileName>$(IntDir)</ObjectFileName>\n", 3); - if(this->Target->GetType() != cmTarget::OBJECT_LIBRARY) - { - this->WriteString("<ProgramDataBaseFileName>", 3); - *this->BuildFileStream << this->Target->GetPDBDirectory(configName.c_str()) - << "/" - << this->Target->GetPDBName(configName.c_str()) - << "</ProgramDataBaseFileName>\n"; - } this->WriteString("</ClCompile>\n", 2); } | ||||||||
Steps To Reproduce | Set the PDB_NAME property on a library, build the Debug config. PDB file is in the right location with 2.8.11 and in the wrong location with 2.8.12. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |||||||||||||||||||||
|
Relationships |
Notes | |
(0034576) Charles Karney (reporter) 2013-11-26 20:56 |
To reproduce: git clone git://git.code.sf.net/p/geographiclib/code [^] geographiclib cd geographiclib git checkout d3deb4d003ed87878f649e9f2f18e8af73edaa86 mkdir BUILD cd BUILD cmake -G 'Visual Studio 10' -D CMAKE_INSTALL_PREFIX=wherever .. cmake --build . --config Debug cmake --build . --config Debug --target INSTALL PDB files are correctly installed with cmake 2.8.11. The install gives an error with 2.8.12: CMake Error at src/cmake_install.cmake:44 (FILE): file INSTALL cannot find "C:/jenkins/workspace/geographiclib-win7-agc/geographiclib-build/win7/geographiclib/src/DEBUG/GeographicLib_STATIC.pdb". Call Stack (most recent call first): cmake_install.cmake:41 (INCLUDE) |
(0034587) Brad King (manager) 2013-11-27 10:31 |
See this commit: VS: Separate compiler and linker PDB files http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=42ba1b08 [^] addressing issue 0014062. |
(0034588) Brad King (manager) 2013-11-27 10:32 |
See also discussion in 0014577. |
(0034623) Charles Karney (reporter) 2013-12-02 07:48 |
So bottom line is that this isn't a bug because PDB files for static libraries are not supported (and maybe even meaningless)? I'm fine with this outcome and only suggest that the documentation make this restriction more explicit. |
(0034679) Brad King (manager) 2013-12-02 12:08 |
Re 0014600:0034623: The commit linked in 0014600:0034587 updated the PDB_NAME and PDB_OUTPUT_DIRECTORY documentation to say that they are only for linker-generated .pdb files for executables and shared libraries. However, I agree the new wording does not stand out much when not looking at that diff. I've made some documentation updates: Help: Document CMAKE_PDB_OUTPUT_DIRECTORY_<CONFIG> variable http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cb7b9072 [^] Help: Format PDB_NAME and PDB_OUTPUT_DIRECTORY documentation http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=09c05f37 [^] Help: Document PDB behavior w.r.t. static libraries explicitly http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c0897cfa [^] |
(0036909) Robert Maynard (manager) 2014-10-06 10:32 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-11-26 20:22 | Charles Karney | New Issue | |
2013-11-26 20:56 | Charles Karney | Note Added: 0034576 | |
2013-11-27 10:29 | Brad King | Relationship added | related to 0011899 |
2013-11-27 10:29 | Brad King | Relationship added | related to 0014062 |
2013-11-27 10:31 | Brad King | Note Added: 0034587 | |
2013-11-27 10:31 | Brad King | Relationship added | related to 0014577 |
2013-11-27 10:32 | Brad King | Note Added: 0034588 | |
2013-12-02 07:48 | Charles Karney | Note Added: 0034623 | |
2013-12-02 12:08 | Brad King | Note Added: 0034679 | |
2013-12-02 12:10 | Brad King | Assigned To | => Brad King |
2013-12-02 12:10 | Brad King | Status | new => resolved |
2013-12-02 12:10 | Brad King | Resolution | open => fixed |
2013-12-02 12:10 | Brad King | Fixed in Version | => CMake 3.0 |
2013-12-02 12:10 | Brad King | Target Version | => CMake 3.0 |
2013-12-02 12:10 | Brad King | Summary | PDB_NAME target property ignored => Document PDB behavior w.r.t. static libraries |
2014-02-18 09:59 | Brad King | Relationship added | related to 0014763 |
2014-10-06 10:32 | Robert Maynard | Note Added: 0036909 | |
2014-10-06 10:32 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |