Meta: Workaround CMAKE_LINKER_TYPE being broken on FreeBSD

https://gitlab.kitware.com/cmake/cmake/-/issues/27037
This commit is contained in:
Undefine 2025-06-30 09:59:59 +02:00 committed by Andrew Kaster
commit 060e8518b4
Notes: github-actions[bot] 2025-07-15 19:46:27 +00:00

View file

@ -26,7 +26,9 @@ endif()
if (LAGOM_USE_LINKER)
# FIXME: Move to only setting CMAKE_LINKER_TYPE once we drop support for CMake < 3.29
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.29)
# NOTE: We can't use CMAKE_SYSTEM_NAME because it's not set before the first project call
# FIXME: https://gitlab.kitware.com/cmake/cmake/-/issues/27037
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.29 AND NOT CMAKE_HOST_SYSTEM_NAME MATCHES "FreeBSD")
string(TOUPPER ${LAGOM_USE_LINKER} linker_type)
set(CMAKE_LINKER_TYPE ${linker_type})
else()