Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/native/corehost/test/ijw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ install_with_stripped_symbols(ijw TARGETS corehost_test)

if (CMAKE_BUILD_TYPE STREQUAL "Debug")
# Copy over the debug CRT so that it is available for test runs
file(TO_CMAKE_PATH "$ENV{VCToolsRedistDir}" CMAKE_VS_VCTOOLSREDISTDIR)
Comment on lines 15 to +16
Copy link

Copilot AI May 14, 2025

Choose a reason for hiding this comment

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

[nitpick] Add a brief comment explaining that file(TO_CMAKE_PATH) is used to normalize Windows paths (transform backslashes to forward slashes) for compatibility with CMake 4.0+.

Suggested change
# Copy over the debug CRT so that it is available for test runs
file(TO_CMAKE_PATH "$ENV{VCToolsRedistDir}" CMAKE_VS_VCTOOLSREDISTDIR)
# Copy over the debug CRT so that it is available for test runs
# Normalize the Windows path (transform backslashes to forward slashes) for compatibility with CMake 4.0+
file(TO_CMAKE_PATH "$ENV{VCToolsRedistDir}" CMAKE_VS_VCTOOLSREDISTDIR)
# Normalize the Windows path (transform backslashes to forward slashes) for compatibility with CMake 4.0+

Copilot uses AI. Check for mistakes.
file(TO_CMAKE_PATH "$ENV{ExtensionSdkDir}" CMAKE_VS_EXTENSIONSDKDIR)
file(
GLOB_RECURSE
DEBUG_CRT_FILES
$ENV{VCToolsRedistDir}/onecore/debug_nonredist/${ARCH_TARGET_NAME}/Microsoft.VC*.DebugCRT/vcruntime*d.dll
$ENV{VCToolsRedistDir}/onecore/debug_nonredist/${ARCH_TARGET_NAME}/Microsoft.VC*.DebugCRT/msvcp*d.dll
$ENV{ExtensionSdkDir}/Microsoft.UniversalCRT.Debug/$ENV{UCRTVersion}/Redist/Debug/${ARCH_TARGET_NAME}/ucrtbased.dll
${CMAKE_VS_VCTOOLSREDISTDIR}/onecore/debug_nonredist/${ARCH_TARGET_NAME}/Microsoft.VC*.DebugCRT/vcruntime*d.dll
${CMAKE_VS_VCTOOLSREDISTDIR}/onecore/debug_nonredist/${ARCH_TARGET_NAME}/Microsoft.VC*.DebugCRT/msvcp*d.dll
${CMAKE_VS_EXTENSIONSDKDIR}/Microsoft.UniversalCRT.Debug/$ENV{UCRTVersion}/Redist/Debug/${ARCH_TARGET_NAME}/ucrtbased.dll
)
install(FILES ${DEBUG_CRT_FILES} DESTINATION corehost_test/ijw-deps)
endif ()
endif ()
Loading