macro(generate_cfgs_from_yaml)

    # Run code generator for dynamic reconfigure
    execute_process(
        COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/util/parameter/generate_parameters.py
        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
        )

    # Store autogenerated cfgs
    file(GLOB_RECURSE AUTOGENERATED_CFGS LIST_DIRECTORIES false CONFIGURE_DEPENDS
        ${CMAKE_CURRENT_SOURCE_DIR}/util/parameter/autogenerated/cfg/*.cfg
        )

    # The yaml files in the /util/paramter/config folder are used
    # to autogenerate the configuration files for dynamic parameters
    # Any changes to the yaml files need to retrigger CMake which 
    # runs the autogeneration python script
    set_property(
        DIRECTORY
        APPEND 
        PROPERTY CMAKE_CONFIGURE_DEPENDS 
        ${CMAKE_CURRENT_SOURCE_DIR}/util/parameter/config
        )

endmacro()
