Optional PDB files in release mode for MSVC#1240
Draft
alxvth wants to merge 9 commits into
Draft
Conversation
ba05f5a to
82eb667
Compare
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.
We would like to use PDB files for error handling with sentry in
Releasemode builds on Windows.The main differences between
RelWithDebugInfoandReleaseis the addition of the compile option/Ziand the link option/DEBUGwhich are responsible for generating full PDB files. Here, we additionally add/Zfwhich enables faster PDB generation in parallel builds, which we ensure with/MP. The optionMV_RELWITHDEBUGINFOindicates whether PDB files should be generated forReleasebuilds. This option isOFFby 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.cmakehelper file which can be re-used by plugins in order to not repeat the same setup in all projects.Additionally:
CMAKE_MSVC_RUNTIME_LIBRARYinstead of adding the multi-threaded runtime option multiple times/Zc:preprocessorto theCMAKE_CXX_FLAGS/permissive-which is implicitly set by the/std:c++20optionDrive-by:
conanfile.py: we should usecache_variablesinstead ofvariablesOpen questions:
RelWithDebInfoandReleasebuilds or just for the latter?Once this is merged, we should update all relevant plugins to use
mv_project_defaults()after theirfind_package(ManiVault ...)calls and remove the then obsolete CMake options sections.Closes #1187. See there for a some additional info.