Skip to content

Optional PDB files in release mode for MSVC#1240

Draft
alxvth wants to merge 9 commits into
masterfrom
feature/OptionalPdbInReleaseMSVC
Draft

Optional PDB files in release mode for MSVC#1240
alxvth wants to merge 9 commits into
masterfrom
feature/OptionalPdbInReleaseMSVC

Conversation

@alxvth
Copy link
Copy Markdown
Contributor

@alxvth alxvth commented Apr 20, 2026

We would like to use PDB files for error handling with sentry in Release mode builds on Windows.

The main differences between RelWithDebugInfo and Release is the addition of the compile option /Zi and the link option /DEBUG which are responsible for generating full PDB files. Here, we additionally add /Zf which enables faster PDB generation in parallel builds, which we ensure with /MP. The option MV_RELWITHDEBUGINFO indicates whether PDB files should be generated for Release builds. This option is OFF by default, except on the CI.

This PR refactors the setup of global CMake variables for OS-dependent compiler settings a bit. It introduces the cmake/mv_project_defaults.cmake helper file which can be re-used by plugins in order to not repeat the same setup in all projects.

Additionally:

Drive-by:

  • Simplify some target property calls
  • Fix setting CMake options from conanfile.py: we should use cache_variables instead of variables

Open questions:

  • Which PDB files do we want to keep in CI builds? Both for RelWithDebInfo and Release builds or just for the latter?

Once this is merged, we should update all relevant plugins to use mv_project_defaults() after their find_package(ManiVault ...) calls and remove the then obsolete CMake options sections.

Closes #1187. See there for a some additional info.

@alxvth alxvth force-pushed the feature/OptionalPdbInReleaseMSVC branch from ba05f5a to 82eb667 Compare May 4, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate optimizing RelWithDebInfo build for improved runtime performance

1 participant