xo-facet xo-object2 facet gen bugfixes
This commit is contained in:
parent
3b64c6ae27
commit
519df04e34
2 changed files with 9 additions and 5 deletions
|
|
@ -1640,6 +1640,12 @@ macro(xo_add_genfacet)
|
|||
|
||||
cmake_parse_arguments(GF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
find_program(GENFACET_EXECUTABLE NAMES genfacet
|
||||
HINTS ${CMAKE_SOURCE_DIR}/xo-facet/codegen
|
||||
DOC "path to xo genfacet code generator"
|
||||
REQUIRED)
|
||||
message(STATUS "GENFACET_EXECUTABLE=${GENFACET_EXECUTABLE}")
|
||||
|
||||
# Build the genfacet command
|
||||
add_custom_command(
|
||||
OUTPUT ${GF_OUTPUT_HPP_DIR}/${FACET}.hpp
|
||||
|
|
@ -1648,12 +1654,11 @@ macro(xo_add_genfacet)
|
|||
${GF_OUTPUT_HPP_DIR}/${GF_OUTPUT_IMPL_SUBDIR}/I${FACET}_Xfer.hpp
|
||||
${GF_OUTPUT_HPP_DIR}/${GF_OUTPUT_IMPL_SUBDIR}/R${FACET}.hpp
|
||||
${GF_OUTPUT_CPP_DIR}/I${FACET}_Any.cpp
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/xo-facet/codegen/genfacet
|
||||
COMMAND ${GENFACET_EXECUTABLE}
|
||||
--input ${GF_INPUT}
|
||||
--output-hpp ${GF_OUTPUT_HPP_DIR}
|
||||
--output-impl-hpp ${GF_OUTPUT_IMPL_SUBDIR}
|
||||
--output-cpp ${GF_OUTPUT_CPP_DIR}
|
||||
--templates ${CMAKE_SOURCE_DIR}/xo-facet/codegen
|
||||
DEPENDS ${GF_INPUT}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "Generating facet source files from ${GF_INPUT}"
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ def format_args_routing(args):
|
|||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--templates', required=True, help='.j2 template directory')
|
||||
parser.add_argument('--input', required=True, help='input IDL JSON5 file')
|
||||
parser.add_argument('--output-impl-hpp', required=True, help='.hpp detail subdir')
|
||||
parser.add_argument('--output-hpp', required=True, help='.hpp output directory')
|
||||
|
|
@ -75,8 +74,8 @@ def main():
|
|||
output_cpp_dir.mkdir(parents=False, exist_ok=True)
|
||||
|
||||
# setup jinja2
|
||||
template_dir = Path(args.templates)
|
||||
#template_dir = Path(__file__).parent
|
||||
#template_dir = Path(args.templates)
|
||||
template_dir = Path(__file__).parent
|
||||
#template_dir = Path(__file__).parent / 'codegen'
|
||||
|
||||
print(f'template_dir: [{template_dir}]')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue