1 #include <boost/filesystem.hpp>
34 template <
typename EnumInterfaceVectorInserter,
typename RuntimeLibInserter>
35 std::pair<EnumInterfaceVectorInserter, RuntimeLibInserter>
37 EnumInterfaceVectorInserter enum_it,
38 RuntimeLibInserter lib_it) {
42 return std::make_pair(enum_it, lib_it);
47 for (
auto &entry : boost::make_iterator_range(
49 fs::path p = entry.path();
50 std::string p_s = p.string();
51 auto p_size = p_s.size();
53 if (fs::is_regular_file(p) &&
54 p_s.compare(p_size - 3, p_size,
".cc") == 0) {
55 fs::path f = p.filename();
56 std::string f_s = f.string();
57 auto f_size = f_s.size();
60 "compiling new custom enumerator: " + f_s.substr(0, f_size - 3);
63 p_s.substr(0, p_size - 3),
69 "make_" + f_s.substr(0, f_size - 3) +
"_interface");
73 std::string method_name = ptr->name();
74 *enum_it++ = std::move(ptr);
75 *lib_it++ = std::make_pair(method_name, lib_ptr);
80 return std::make_pair(enum_it, lib_it);
Specification of CASM project directory structure.
fs::path root_dir() const
Return casm project directory path.
fs::path enumerator_plugins() const
Return enumerators plugin dir.
DirectoryStructure const & dir() const
Access DirectoryStructure object. Throw if not set.
std::string compile_options() const
std::string so_options() const
A 'cloneable_ptr' can be used in place of 'unique_ptr'.
std::shared_ptr< RuntimeLibrary > log_make_shared_runtime_lib(std::string filename_base, std::string compile_options, std::string so_options, std::string compile_msg)
Make shared_ptr<RuntimeLibrary>, logging progress and errors.
std::pair< EnumInterfaceVectorInserter, RuntimeLibInserter > load_enumerator_plugins(ProjectSettings const &set, EnumInterfaceVectorInserter enum_it, RuntimeLibInserter lib_it)
Load enumerator plugins from a CASM project.
std::string include_path(const fs::path &dir)
DirectoryStructure const & dir