You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CMake]: Use check_linker_flag for /DEPENDENTLOADFLAG
PR oneapi-src#2100 changed the WIN32 check to check from `if(WIN32)` to
checking if link.exe is used via `CMAKE_CXX_COMPILER_LINKER_ID`.
This has two problems:
- CMAKE_CXX_COMPILER_LINKER_ID is only supported starting with CMake 3.29,
but UR still claims to CMake versions from 3.20
(`cmake_minimum_required` is called with this version).
This results in the flag being silently dropped in earlier versions of
CMake.
- There are other linkers that also support this flag for example LLD.
Using check_linker_flag resolves these issues without hard-coding a list
of known linkers.
0 commit comments