How can I prevent creating huge PDB and ILK files while keeping it for my program using QT?
15:30 09 Apr 2026

I have compiled the QT framework in Debugx64 mode.

Than I have written a simple program (window with several buttons + using of QDirIterator to enumerate files) in Debugx64 too (Visual Studio 2022, CMAKE-project).

Each time I build the program VS create 2 huge PDB and ILK files (about of 250 MB each) which slows the build.

I understand that I get that huge files because of VS created debug info for the compiled QT (probably, 99%) + for my program.

Can I prevent including huge debug information of the QT, while keeping it for my program to debug it (I don't need to trace QT internals) ? If I can, how can I pass the necessary keys in my CMAKE project to the compiler/linker (MSVC) ?

visual-studio qt cmake