xo-cmake: streamline facet gen
This commit is contained in:
parent
e3711860f1
commit
6b22aab6fb
4 changed files with 20 additions and 9 deletions
|
|
@ -1702,7 +1702,8 @@ function(xo_add_genfacetimpl)
|
|||
set(options "")
|
||||
set(oneValueArgs
|
||||
TARGET # Name for this generation target
|
||||
FACET_DIR # facet directory
|
||||
FACET_PKG # package providing abstract interface
|
||||
FACET_DIR # facet directory (instead of FACET_PKG)
|
||||
FACET # facet name
|
||||
REPR # representation name
|
||||
INPUT # Input .json5 file
|
||||
|
|
@ -1736,6 +1737,15 @@ function(xo_add_genfacetimpl)
|
|||
message(FATAL_ERROR "xo_add_genfacetimpl: OUTPUT_CPP_DIR 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()
|
||||
get_target_property(_facet_dir share_${GF_FACET_PKG} path)
|
||||
set(GF_FACET_DIR ${_facet_dir})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_program(GENFACET_EXECUTABLE NAMES genfacet
|
||||
HINTS ${CMAKE_SOURCE_DIR}/xo-facet/codegen
|
||||
DOC "path to xo genfacet code generator"
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ xo_add_genfacet(
|
|||
|
||||
xo_add_genfacetimpl(
|
||||
TARGET xo-object2-facetimpl-sequence-list
|
||||
FACET_PKG xo_object2
|
||||
FACET Sequence
|
||||
REPR List
|
||||
INPUT idl/ISequence_DList.json5
|
||||
|
|
@ -37,12 +38,13 @@ xo_add_genfacetimpl(
|
|||
OUTPUT_CPP_DIR src/object2
|
||||
)
|
||||
|
||||
get_target_property(xo_printable2_dir share_xo_printable2 path)
|
||||
message(STATUS "xo_printable2_dir=${xo_printable2_dir}")
|
||||
#get_target_property(xo_printable2_dir share_xo_printable2 path)
|
||||
#message(STATUS "xo_printable2_dir=${xo_printable2_dir}")
|
||||
|
||||
xo_add_genfacetimpl(
|
||||
TARGET xo-object2-facetimpl-printable-float
|
||||
FACET_DIR ${xo_printable2_dir}
|
||||
FACET_PKG xo_printable2
|
||||
# FACET_DIR ${xo_printable2_dir}
|
||||
FACET Printable
|
||||
REPR Float
|
||||
INPUT idl/IPrintable_DFloat.json5
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
|
||||
* [/home/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DFloat.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -45,8 +45,7 @@ namespace xo {
|
|||
/** @defgroup scm-printable-dfloat-methods **/
|
||||
///@{
|
||||
/** Pretty-printing support for this object.
|
||||
See [xo-indentlog/xo/indentlog/pretty.hpp]
|
||||
**/
|
||||
See [xo-indentlog/xo/indentlog/pretty.hpp] **/
|
||||
static bool pretty(const DFloat & self, const ppindentinfo & ppii);
|
||||
|
||||
///@}
|
||||
|
|
@ -55,4 +54,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end */
|
||||
/* end */
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
|
||||
* [/home/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DFloat.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue