rule("c++.codegen")
    set_extensions(".inl")
    after_load(function (target)
        import("meta_refl")
        local headerfiles = {}
        local files = target:extraconf("rules", "c++.codegen", "files")
        for _, file in ipairs(files) do
            local p = path.join(target:scriptdir(), file)
            for __, filepath in ipairs(os.files(p)) do
                table.insert(headerfiles, filepath)
            end
        end
        meta_refl(target, headerfiles)
    end)
    on_config(function (target)
        import("meta_refl").gen(target)
    end)