]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: skip boost dependency on ALIAS executable targets 55638/head
authorSeena Fallah <seenafallah@gmail.com>
Mon, 19 Feb 2024 09:39:24 +0000 (10:39 +0100)
committerSeena Fallah <seenafallah@gmail.com>
Wed, 19 Nov 2025 21:11:08 +0000 (22:11 +0100)
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 <seenafallah@gmail.com>
cmake/modules/BuildBoost.cmake

index a662591fbf9c37f5a43c9a3a6aa5a253e1346c56..470dd20a36fa0a5bcc6ac4345fbc45e6706fdd61 100644 (file)
@@ -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()