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

◆ get_clang_resource_dir()

const std::string & MayaFlux::Platform::SystemConfig::get_clang_resource_dir ( )
static

Definition at line 55 of file HostEnvironment.cpp.

56{
57 static std::string cached_resource_dir;
58
59 if (cached_resource_dir.empty()) {
60 const char* cmd = "clang -print-resource-dir";
61 auto result = exec_command(cmd);
62 trim_output(result);
63
64 if (!result.empty()
65 && (result.find("error:") == std::string::npos)
66 && (result.find("clang") != std::string::npos
67 || result.find("lib") != std::string::npos
68 || fs::exists(result))) {
69 {
70 cached_resource_dir = std::move(result);
71 }
72 }
73 }
74
75 return cached_resource_dir;
76}
vk::CommandBuffer cmd
static void trim_output(std::string &str)
static std::string exec_command(const char *cmd)

References cmd, exec_command(), and trim_output().

Referenced by Lila::ClangInterpreter::initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: