in include/poac/util/stroite/core/builder.hpp [71:103]
auto make_include_search_path() {
namespace fs = boost::filesystem;
namespace naming = poac::core::naming;
namespace exception = poac::core::exception;
namespace lock = poac::core::lock;
namespace yaml = poac::io::file::yaml;
namespace io = poac::io::file;
std::vector<std::string> include_search_path;
if (deps_node) { // subcmd/build.hppで,存在確認が取れている
if (const auto locked_deps = lock::load_ignore_timestamp()) {
for (const auto& [name, dep] : (*locked_deps).backtracked) {
const std::string current_package_name = naming::to_current(dep.source, name, dep.version);
const fs::path package_path = io::path::current_deps_dir / current_package_name;
if (const fs::path include_dir = package_path / "include"; fs::exists(include_dir)) {// io::file::path::validate_dir??
include_search_path.push_back(include_dir.string());
}
else {
throw exception::error(
name + " is not installed.\n"
"Please build after running `poac install`");
}
}
}
else {
throw exception::error(
"Could not load poac.lock.\n"
"Please build after running `poac install`");
}
}
return include_search_path;
}