Closed jaw closed 2 months ago
Or alternatively: maybe only do this if the compiler actually is msvc2017...
PDB file is generated in the cmake build directory which is invalid
Could you elaborate why is it invalid and which directory would you expect it to be?
could it be that the issue lies in the fact that the CMAKE_BINARY_DIR
is used? That's not where the .lib is being put necessarily, instead CMAKE_LIBRARY_OUTPUT_DIRECTORY
is used which might point to a different location.
PDB file is generated in the cmake build directory which is invalid
Could you elaborate why is it invalid and which directory would you expect it to be?
Yes, I wasn't totally clear in my wording; the PDB file is corrupt, at least according to breakpad's dump_syms. Looking at it, it's smaller than the "real" working one, ~700k instead of >2MB.
@jaw Could you please describe a bit more about your environment?
Because for me on current master (5eb68c0), the size of Debug\fmtd.pdb
is 815,104 bytes even if I revert my change from 52a99a6. How did you get this "real" PDB that is bigger?
I'm using VS2022 17.9.5 with:
cmake . -G "Visual Studio 17 2022"
cmake --build .
It seems strange to me that the PDB file would be corrupt if you change the output directory. This might indicate a bug in a specific version of MSVC so I recommend reporting to Microsoft although I'm not opposed to a workaround. Closing for now but feel free to reopen with more details/repro per @pklima's comment.
When compiling with these 3 lines on using MSVC2022, a PDB file is generated in the cmake build directory which is invalid:
https://github.com/fmtlib/fmt/blob/5eb68c0ef25070fe21861c37e6f8458b08453588/CMakeLists.txt#L323 https://github.com/fmtlib/fmt/blob/5eb68c0ef25070fe21861c37e6f8458b08453588/CMakeLists.txt#L324 https://github.com/fmtlib/fmt/blob/5eb68c0ef25070fe21861c37e6f8458b08453588/CMakeLists.txt#L325
Would it be possible to split out these properties and make them default on, but optionally disabled?