Copy Qt pdb files to the build folder when present - #14502
Merged
Conversation
Qt is distributed both with and without pdb files. When they are present, copy them next to the Qt dlls so symbols are available when debugging. Pass --pdb to windeployqt for the configurations built with debug information, and copy the matching pdb file in the AppFwk test applications and unit tests using a helper script that skips missing files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qt is distributed both with and without pdb files. When they are present, copy them next to the Qt dlls in the build folder, so symbols are available when debugging into Qt.
ApplicationExeCode: pass--pdbtowindeployqtfor the configurations built with debug information (Debug and RelWithDebInfo). The install step usesRUNTIME_DEPENDENCIES, which resolves dlls only, so the pdb files are not added to the installer.$<TARGET_PDB_FILE:...>is not available for imported targets, andcmake -E copy_if_differentfails on a missing source file, so the copy is done by a small helper script,Fwk/AppFwk/cmake/CopyPdbIfExists.cmake, that derives the pdb name from the dll and skips the copy if the file is not present.