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

Need to set CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY to lib folder in CMakeLists.txt #1232

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

slambon
Copy link

@slambon slambon commented Oct 12, 2023

There's currently a warning message when using YAML-CPP as static library in debug mode because the library yaml-cppd.lib is expecting / missing pdb information. By setting the pdb generation folder to the lib folder, the compiler is no longer complaining.

It now looks like this:

.\RootBuildFolder\Release
- yaml-cpp.lib

.\RootBuildFolder\Debug
- yaml-cpp static.pdb
- yaml-cppd.lib

See more about the problem:
https://stackoverflow.com/questions/25843883/how-to-remove-warning-lnk4099-pdb-lib-pdb-was-not-found

There's currently a warning message when using YAML-CPP as static library in debug mode because the library yaml-cppd.lib is expecting / missing pdb information. By setting the pdb generation folder to the lib folder, the compiler is no longer complaining.

It now looks like this:
.\RootBuildFolder\Release
- yaml-cpp.lib
.\RootBuildFolder\Debug
- yaml-cpp static.pdb
- yaml-cppd.lib

See more about the problem:
https://stackoverflow.com/questions/25843883/how-to-remove-warning-lnk4099-pdb-lib-pdb-was-not-found
Copy link
Owner

@jbeder jbeder left a comment

Choose a reason for hiding this comment

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

Is there a way to test this? For example, how would you make sure the CI flags this if there's a regression?

@@ -47,6 +47,8 @@ else()
set(yaml-cpp-label-postfix "static")
endif()

set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_INSTALL_LIBDIR}/../")
Copy link
Owner

Choose a reason for hiding this comment

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

It strikes me as a little weird that you're using a parent directory here. Is there a more direct way to put this file in the right spot?

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.

2 participants