Skip to content

Install debug libraries on Windows #1219

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

Merged
merged 1 commit into from
Mar 31, 2025
Merged

Conversation

PatKamin
Copy link
Contributor

Description

Always install debug libraries on Windows. Introduce new CMake option UMF_USE_DEBUG_POSTFIX for adding a "d" postfix to debug libraries names.

These changes are required for intel/llvm#17512.

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly
  • CI workflows, not executed per PR (e.g. Nightly), execute properly
  • New tests added, especially if they will fail without my changes
  • Added/extended example(s) to cover this functionality
  • Extended the README/documentation
  • All newly added source files have a license
  • All newly added source files are referenced in CMake files
  • Logger (with debug/info/... messages) is used
  • All API changes are reflected in docs and def/map files, and are tested

@PatKamin PatKamin force-pushed the debug-dll branch 3 times, most recently from 0c4b350 to ad081ef Compare March 25, 2025 10:30
@PatKamin PatKamin force-pushed the debug-dll branch 9 times, most recently from 24d186d to c4fc00a Compare March 27, 2025 16:15
@PatKamin PatKamin marked this pull request as ready for review March 27, 2025 16:17
@PatKamin PatKamin requested a review from a team as a code owner March 27, 2025 16:17
@PatKamin PatKamin requested a review from bratpiorka March 28, 2025 08:04
# users can link against it in debug builds.
set(CMAKE_DEBUG_POSTFIX d)

add_custom_target(
Copy link
Contributor

Choose a reason for hiding this comment

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

could you also add comment here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@bratpiorka bratpiorka requested a review from KFilipek March 31, 2025 08:58
when UMF_USE_DEBUG_POSTFIX CMake option is set.
@KFilipek KFilipek merged commit e3d2929 into oneapi-src:main Mar 31, 2025
87 checks passed
@PatKamin PatKamin deleted the debug-dll branch March 31, 2025 13:54
Comment on lines +443 to +449
add_custom_command(
TARGET umfd
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/bin/Debug/umfd.dll
${CMAKE_BINARY_DIR}/bin/Release/umfd.dll
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/lib/Debug/umfd.lib
${CMAKE_BINARY_DIR}/lib/Release/umfd.lib
COMMENT "Copying debug libraries to the Release build directory")
Copy link
Contributor

Choose a reason for hiding this comment

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

This breaks when using Ninja generator (I assume also Unix Makefiles which is what internal builds use).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes made in #1238

Comment on lines +846 to +849
install(FILES ${CMAKE_BINARY_DIR}/bin/Debug/umfd.dll
DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${CMAKE_BINARY_DIR}/lib/Debug/umfd.lib
DESTINATION ${CMAKE_INSTALL_LIBDIR})
Copy link
Contributor

Choose a reason for hiding this comment

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

And so do these. Also unable to install only these because there's no COMPONENT to name.

@bratpiorka bratpiorka added this to the v0.11.x milestone Apr 15, 2025
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.

4 participants