auto check_src_cpp()

in include/poac/util/stroite/core/builder.hpp [183:212]


        auto check_src_cpp(const std::vector<std::string>& source_files)
        {
            namespace fs = boost::filesystem;

            std::vector<std::string> new_source_files;
            for (const auto& sf : source_files) {
                if (const auto previous_ts = load_timestamps(to_cache_hash_path(sf))) {
                    if (const auto current_ts = generate_timestamps(sf))
                    {
                        // Since hash of already existing hash file
                        //  does not match hash of current cpp file,
                        //  it does not exclude it from compilation,
                        //  and generates hash for overwriting.
                        if (*previous_ts != *current_ts) {
                            depends_ts[to_cache_hash_path(sf)] = *current_ts;
                            new_source_files.push_back(sf);
                        }
                    }
                }
                else {
                    // Since hash file does not exist, generates hash and compiles source file.
                    if (const auto cur_hash = generate_timestamps(sf))
                    {
                        depends_ts[to_cache_hash_path(sf)] = *cur_hash;
                        new_source_files.push_back(sf);
                    }
                }
            }
            return new_source_files;
        }