std::string to_string()

in include/poac/util/stroite/utils/options.hpp [29:46]


    std::string to_string(const compile& c) {
        command opts;
        opts += c.version_prefix + std::to_string(c.cpp_version);
        opts += "-c";
        opts += accumulate(begin(c.source_files), end(c.source_files), command());
        opts += accumulate(begin(c.include_search_path), end(c.include_search_path), command(),
                [](command acc, auto s) { return acc + ("-I" + s); });
        opts += accumulate(begin(c.other_args), end(c.other_args), command());
        opts += accumulate(begin(c.macro_defns), end(c.macro_defns), command());
        opts += "-o";
        for (const auto& s : c.source_files) {
            auto obj_path = c.output_root / fs::relative(s);
            obj_path.replace_extension("o");
            fs::create_directories(obj_path.parent_path());
            opts += obj_path.string();
        }
        return opts.data();
    }