From: Seena Fallah Date: Mon, 19 Feb 2024 09:39:24 +0000 (+0100) Subject: cmake: skip boost dependency on ALIAS executable targets X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4468c4ef004a5d812a91d1e13a514b3c3cc1dffd;p=ceph.git 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 --- diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake index a662591fbf9c..470dd20a36fa 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()