function(ark_gen_class_hierarchy CLASS_HIERARCHY_NAME NAMESPACES WORKING_DIRECTORY)
set(LOCAL_FILE_NAME ${CLASS_HIERARCHY_NAME}_class_hierarchy)
set(LOCAL_CPP_FILEPATH ${ARK_GENERATED_FILE_DIRECTORY}/${LOCAL_FILE_NAME}.cpp)
foreach(i IN LISTS ARGN)
file(GLOB LOCAL_FILES "${WORKING_DIRECTORY}/${i}/*.h")
list(APPEND LOCAL_FILE_DEPENDS ${LOCAL_FILES})
endforeach()
add_custom_command(OUTPUT ${LOCAL_CPP_FILEPATH}
    COMMAND python ${ARK_SRC_DIR}/tools/python/gen_class_hierarchy.py -o ${LOCAL_CPP_FILEPATH} -n ${CLASS_HIERARCHY_NAME} -s ${NAMESPACES} ${ARGN}
    DEPENDS ${ARK_SRC_DIR}/tools/python/gen_class_hierarchy.py ${LOCAL_FILE_DEPENDS}
    WORKING_DIRECTORY ${WORKING_DIRECTORY})
list(APPEND LOCAL_GENERATED_SRC_LIST ${LOCAL_CPP_FILEPATH})
set(LOCAL_GENERATED_SRC_LIST ${LOCAL_GENERATED_SRC_LIST} PARENT_SCOPE)

list(APPEND LOCAL_BOOTSTRAP_FUNCS "__ark_bootstrap_${LOCAL_FILE_NAME}__")
set(LOCAL_BOOTSTRAP_FUNCS ${LOCAL_BOOTSTRAP_FUNCS} PARENT_SCOPE)

endfunction()
