From 4468c4ef004a5d812a91d1e13a514b3c3cc1dffd Mon Sep 17 00:00:00 2001 From: Seena Fallah Date: Mon, 19 Feb 2024 10:39:24 +0100 Subject: [PATCH] cmake: skip boost dependency on ALIAS executable targets The current add_executable override in Boost does not support alias targets. Although Ceph currently has no alias targets that are affected by this limitation, addressing this issue now will benefit future developments and personal projects. This change enhances the robustness of the override logic, ensuring compatibility with alias targets moving forward. Signed-off-by: Seena Fallah --- cmake/modules/BuildBoost.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake index a662591fbf9..470dd20a36f 100644 --- a/cmake/modules/BuildBoost.cmake +++ b/cmake/modules/BuildBoost.cmake @@ -315,5 +315,8 @@ endfunction() function(add_executable target) _add_executable(${target} ${ARGN}) - maybe_add_boost_dep(${target}) + # can't add dependencies to aliases + if (NOT ";${ARGN};" MATCHES ";(ALIAS);") + maybe_add_boost_dep(${target}) + endif() endfunction() -- 2.47.3