build: retire unused args from xo_add_genfacetimpl

This commit is contained in:
Roland Conybeare 2026-03-11 09:55:48 -05:00
commit c271c70146

View file

@ -1736,10 +1736,8 @@ function(xo_add_genfacetimpl)
set(oneValueArgs
TARGET # Name for this generation target
FACET_PKG # package providing abstract interface
FACET_DIR # facet directory (instead of FACET_PKG)
FACET # facet name
INPUT # Input .json5 file
OUTPUT_IMPL_SUBDIR # Subdirectory name for impl headers
)
set(multiValueArgs "")
@ -1754,25 +1752,23 @@ function(xo_add_genfacetimpl)
if(NOT DEFINED GF_INPUT)
message(FATAL_ERROR "xo_add_genfacetimpl: INPUT is required")
endif()
if(NOT DEFINED GF_FACET_DIR)
if (NOT DEFINED GF_FACET_PKG)
message(FATAL_ERROR "xo_add_genfacetimpl: FACET_PKG or FACET_DIR required")
else()
# share_${GF_FACET_PKG} is a cmake target created by xo_add_shared_library4()
# or similar when a facet-provider (e.g. xo-gc) builds from source in the same
# cmake context (XO_SUBMODULE_BUILD=True).
#
# It is NOT exported in the installed cmake
# config, so it won't exist when the facet package is consumed as an installed
# dependency (e.g. in a standalone nix build).
#
if(NOT TARGET share_${GF_FACET_PKG})
message(STATUS "xo_add_genfacetimpl: share_${GF_FACET_PKG} not available; skipping ${GF_TARGET}")
return()
endif()
get_target_property(_facet_dir share_${GF_FACET_PKG} path)
set(GF_FACET_DIR ${_facet_dir})
if (NOT DEFINED GF_FACET_PKG)
message(FATAL_ERROR "xo_add_genfacetimpl: FACET_PKG required")
else()
# share_${GF_FACET_PKG} is a cmake target created by xo_add_shared_library4()
# or similar when a facet-provider (e.g. xo-gc) builds from source in the same
# cmake context (XO_SUBMODULE_BUILD=True).
#
# It is NOT exported in the installed cmake
# config, so it won't exist when the facet package is consumed as an installed
# dependency (e.g. in a standalone nix build).
#
if(NOT TARGET share_${GF_FACET_PKG})
message(FATAL_ERROR "xo_add_genfacetimpl: share_${GF_FACET_PKG} not available; skipping ${GF_TARGET}")
return()
endif()
get_target_property(_facet_dir share_${GF_FACET_PKG} path)
set(GF_FACET_DIR ${_facet_dir})
endif()
find_program(GENFACET_EXECUTABLE NAMES genfacet