-
Notifications
You must be signed in to change notification settings - Fork 35
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
Fix incorrect pdb names #34
base: master
Are you sure you want to change the base?
Conversation
@@ -617,7 +617,7 @@ if (LIBRAW_INSTALL) | |||
if(NOT BUILD_SHARED_LIBS AND "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC") | |||
message("ClangCl does not support pdb generation with static libraries") | |||
elseif(MSVC) | |||
install(FILES ${PROJECT_BINARY_DIR}/raw.pdb ${PROJECT_BINARY_DIR}/raw_r.pdb | |||
install(FILES ${PROJECT_BINARY_DIR}/raw${CMAKE_DEBUG_POSTFIX}.pdb ${PROJECT_BINARY_DIR}/raw_r${CMAKE_DEBUG_POSTFIX}.pdb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this break when building in release mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, for release builds CMAKE_DEBUG_POSTFIX will return an empty string so you'll get the same behavior as currently with the resulting installed files of raw.pdb and raw_r.pdb. At least that's what my testing shows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CMake docs https://cmake.org/cmake/help/latest/variable/CMAKE_CONFIG_POSTFIX.html don't suggest that this is only set for matching build types. Which makes sense to me as having this information available in general is useful for multi-config generators.
@hartcw Any advice since you added pdb installation in 9e4991f?
Anything that prevents from merging this PR? I'm hitting the same issue! Thanks @jedfrechette for fixing it! UPD. There's also this issue that |
@ribtoks It would be helpful if you could test this locally and submit a new PR given that the original author isn't responsive. |
#40 Literally just "tested locally" on Windows 10 and ended up using my temporary fork as this change is not in the main repository. Seems to work "on my computer" just fine. Visual Studio 2019, CMake 3.18.4 |
Closes #29