Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set PDB path for Visual Studio #3702

Merged
merged 1 commit into from
Nov 7, 2023
Merged

Set PDB path for Visual Studio #3702

merged 1 commit into from
Nov 7, 2023

Conversation

pklima
Copy link
Contributor

@pklima pklima commented Nov 4, 2023

Ensure the PDB files are output into the same directory and with the same name as the static library when using Visual Studio.

Resolves #3701.

Copy link
Contributor

@vitaut vitaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR

CMakeLists.txt Outdated
Comment on lines 315 to 323
DEBUG_POSTFIX "${FMT_DEBUG_POSTFIX}"
COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
COMPILE_PDB_NAME "fmt"
COMPILE_PDB_NAME_DEBUG "fmt${FMT_DEBUG_POSTFIX}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a short comment clarifying that these are for MSVC 2017 only. We'll remove this workaround in the future once the compiler version is no longer supported.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to do that, but I'm not sure this should be looked at as a temporary workaround. Not having it leaves you at the mercy of the defaults and I'm worried that in some future VS version the defaults could change again to who knows what.

Would you still like me to describe it as a temporary workaround, or as something that simply has to be set for Visual Studio?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you still like me to describe it as a temporary workaround, or as something that simply has to be set for Visual Studio?

Yes, please. We don't need to guard against theoretical future MSVC regressions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, done!

Ensure the PDB files are output into the same directory and with the same name
as the static library when using Visual Studio.

Resolves fmtlib#3701.
@vitaut vitaut merged commit 52a99a6 into fmtlib:master Nov 7, 2023
40 checks passed
happymonkey1 pushed a commit to happymonkey1/fmt that referenced this pull request Apr 7, 2024
Ensure the PDB files are output into the same directory and with the same name
as the static library when using Visual Studio.

Resolves fmtlib#3701.
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.

CMake does not set PDB path for Visual Studio
2 participants