MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ exec_command()

std::string MayaFlux::Platform::SystemConfig::exec_command ( const char *  cmd)
static

Definition at line 200 of file HostEnvironment.cpp.

201{
202 std::array<char, 128> buffer {};
203 std::string result;
204
205 using PipeCloser = int (*)(FILE*);
206#ifdef MAYAFLUX_PLATFORM_WINDOWS
207 std::unique_ptr<FILE, PipeCloser> pipe(_popen(cmd, "r"), _pclose);
208#else
209 std::unique_ptr<FILE, PipeCloser> pipe(popen(cmd, "r"), pclose);
210#endif
211
212 if (!pipe)
213 return "";
214
215 while (fgets(buffer.data(), static_cast<int>(buffer.size()), pipe.get())) {
216 result += buffer.data();
217 }
218 return result;
219}
vk::CommandBuffer cmd
std::shared_ptr< NetworkGeometryBuffer > buffer

References buffer, and cmd.

Referenced by get_clang_includes(), and get_clang_resource_dir().

+ Here is the caller graph for this function: