From 2febbe31463d54644376133d3f0d9c5917a4e6d1 Mon Sep 17 00:00:00 2001 From: Dennis Klein Date: Wed, 10 Jun 2026 16:14:15 +0200 Subject: [PATCH] build: append linker flags as strings, not lists - CMAKE_EXE_LINKER_FLAGS and CMAKE_SHARED_LINKER_FLAGS are command-line strings; list(APPEND) inserts a semicolon once the variable is non-empty, which splits the link command at the shell level - latent until now because nothing passed linker flags on the cmake command line --- cmake/FairMQProjectSettings.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/FairMQProjectSettings.cmake b/cmake/FairMQProjectSettings.cmake index 62147e11..ea73c9f5 100644 --- a/cmake/FairMQProjectSettings.cmake +++ b/cmake/FairMQProjectSettings.cmake @@ -54,8 +54,8 @@ endif() list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${PROJECT_INSTALL_LIBDIR}" isSystemDir) if("${isSystemDir}" STREQUAL "-1") if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - list(APPEND CMAKE_EXE_LINKER_FLAGS "-Wl,--enable-new-dtags") - list(APPEND CMAKE_SHARED_LINKER_FLAGS "-Wl,--enable-new-dtags") + string(APPEND CMAKE_EXE_LINKER_FLAGS " -Wl,--enable-new-dtags") + string(APPEND CMAKE_SHARED_LINKER_FLAGS " -Wl,--enable-new-dtags") list(PREPEND CMAKE_INSTALL_RPATH "$ORIGIN/../${PROJECT_INSTALL_LIBDIR}") elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") list(PREPEND CMAKE_INSTALL_RPATH "@loader_path/../${PROJECT_INSTALL_LIBDIR}")