MayaFlux 0.4.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 182 of file HostEnvironment.cpp.

183{
184 std::array<char, 128> buffer {};
185 std::string result;
186
187 using PipeCloser = int (*)(FILE*);
188#ifdef MAYAFLUX_PLATFORM_WINDOWS
189 std::unique_ptr<FILE, PipeCloser> pipe(_popen(cmd, "r"), _pclose);
190#else
191 std::unique_ptr<FILE, PipeCloser> pipe(popen(cmd, "r"), pclose);
192#endif
193
194 if (!pipe)
195 return "";
196
197 while (fgets(buffer.data(), static_cast<int>(buffer.size()), pipe.get())) {
198 result += buffer.data();
199 }
200 return result;
201}
vk::CommandBuffer cmd

References cmd.

Referenced by get_clang_includes(), and get_clang_resource_dir().

+ Here is the caller graph for this function: