Files
CMake/Tests/MSManifest/Subdir2/check.cmake
T
Rüdiger Ihle 09a47c7972 MSVC: Restore support for non-incremental linking with v100 toolset and older
Since commit 0b552eb877 (MSVC: Embed manifests directly for
non-incremental vs_link_exe links, 2023-02-20, v3.27.0-rc1~438^2) we use
`/MANIFEST:EMBED`, but that is not supported by older MSVC linkers.
Restore use of the standalone manifest tool.

Update `Tests/MSManifest` to recognize `dpiAwareness` in the manifest
content as written by MSVC v100 tooling.

Fixes: #26179
2024-09-03 10:58:28 -04:00

23 lines
939 B
CMake

file(STRINGS "${exe}" manifest_content1 REGEX "name=\"Kitware.CMake.MSMultipleManifest\"")
if(manifest_content1)
message(STATUS "Expected manifest content found:\n ${manifest_content1}")
else()
message(FATAL_ERROR "Expected manifest content not found in\n ${exe}")
endif()
# Verify Second Manifest Content is inside Executable.
file(STRINGS "${exe}" manifest_content2 REGEX "8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a")
if(manifest_content2)
message(STATUS "Expected manifest content found:\n ${manifest_content2}")
else()
message(FATAL_ERROR "Expected manifest content not found in\n ${exe}")
endif()
# Verify Third Manifest Content is inside Executable.
file(STRINGS "${exe}" manifest_content3 REGEX "<dpiAwareness.*>PerMonitorV2</dpiAwareness>")
if(manifest_content3)
message(STATUS "Expected manifest content found:\n ${manifest_content3}")
else()
message(FATAL_ERROR "Expected manifest content not found in\n ${exe}")
endif()