Add comments
This commit is contained in:
parent
d5a28b1580
commit
1aed5c93f1
@ -57,6 +57,7 @@ struct CompileOutput {
|
||||
std::string obj_string;
|
||||
};
|
||||
|
||||
/// @brief Compiles the contents from the given filename and returns output as strings
|
||||
std::optional<CompileOutput> compile(std::string_view in_filename) {
|
||||
std::string out{ read_file(in_filename) };
|
||||
|
||||
@ -154,6 +155,7 @@ std::optional<CompileOutput> compile(std::string_view in_filename) {
|
||||
};
|
||||
}
|
||||
|
||||
/// @brief Executes a given command and returns the output as std::string
|
||||
std::string exec(const char* cmd) {
|
||||
std::array<char, 128> buffer;
|
||||
std::string result;
|
||||
@ -168,7 +170,6 @@ std::string exec(const char* cmd) {
|
||||
}
|
||||
|
||||
/// @brief Discovers the path of a given library using POSIX-util "whereis"
|
||||
/// @param libname
|
||||
/// @return path to the library, empty string if nothing was found
|
||||
std::string find_lib(std::string libname) {
|
||||
std::string cmd = "whereis " + libname;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user