From f804d4f1e949124064db2496751d5730a1af14c9 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Tue, 20 Jan 2026 22:10:59 -0500 Subject: [PATCH] xo-cmake: + xo_add_genfacet_all() cmake function --- xo-cmake/cmake/xo_macros/xo_cxx.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xo-cmake/cmake/xo_macros/xo_cxx.cmake b/xo-cmake/cmake/xo_macros/xo_cxx.cmake index c071f061..dde3c081 100644 --- a/xo-cmake/cmake/xo_macros/xo_cxx.cmake +++ b/xo-cmake/cmake/xo_macros/xo_cxx.cmake @@ -1735,6 +1735,8 @@ function(xo_add_genfacet) # Create a target for this generation add_custom_target(${GF_TARGET} DEPENDS ${generatedFiles}) + + set_property(DIRECTORY APPEND PROPERTY XO_GENFACET_TARGETS ${GF_TARGET}) endfunction() function(xo_add_genfacetimpl) @@ -1815,4 +1817,16 @@ function(xo_add_genfacetimpl) # Create a target for this generation add_custom_target(${GF_TARGET} DEPENDS ${generatedFiles}) + + set_property(DIRECTORY APPEND PROPERTY XO_GENFACET_TARGETS ${GF_TARGET}) +endfunction() + +# create umbrella target for all genfacet targets in current directory +function(xo_add_genfacet_all target_name) + get_property(genfacet_targets DIRECTORY PROPERTY XO_GENFACET_TARGETS) + if(genfacet_targets) + add_custom_target(${target_name} DEPENDS ${genfacet_targets}) + else() + message(WARNING "xo_add_genfacet_all: no genfacet targets found") + endif() endfunction()