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

CMake does not set PDB path for Visual Studio #3701

Closed
pklima opened this issue Nov 4, 2023 · 0 comments · Fixed by #3702
Closed

CMake does not set PDB path for Visual Studio #3701

pklima opened this issue Nov 4, 2023 · 0 comments · Fixed by #3702

Comments

@pklima
Copy link
Contributor

pklima commented Nov 4, 2023

The Visual Studio solution generated by CMake does not have Program Database File Name set.

This means that the default is used. In VS2022 and VS2019 this ends up working out because the default is $(OutDir)$(TargetName).pdb, but in VS2017 the default is the far more unfortunate $(IntDir)$(ProjectName).pdb, meaning the file is output in the wrong directory, and in Debug also with the wrong name (fmt.dir\Debug\fmt.pdb instead of Debug\fmtd.pdb).

I would expect that the property is set so that the .pdb always ends up next to the .lib with the same name, i.e.:

  • In Debug: fmtd.lib + fmtd.pdb
  • In RelWithDebInfo: fmt.lib + fmt.pdb

It seems that the relevant CMake properties are COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG> and COMPILE_PDB_NAME_<CONFIG>.

pklima added a commit to pklima/fmt that referenced this issue 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 fmtlib#3701.
pklima added a commit to pklima/fmt that referenced this issue Nov 7, 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 fmtlib#3701.
vitaut pushed a commit that referenced this issue Nov 7, 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.
happymonkey1 pushed a commit to happymonkey1/fmt that referenced this issue 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 a pull request may close this issue.

1 participant