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

38{
39 static std::string cached_resource_dir;
40
41 if (cached_resource_dir.empty()) {
42 const char* cmd = "clang -print-resource-dir";
43 auto result = exec_command(cmd);
44 trim_output(result);
45
46 if (!result.empty()
47 && (result.find("error:") == std::string::npos)
48 && (result.find("clang") != std::string::npos
49 || result.find("lib") != std::string::npos
50 || fs::exists(result))) {
51 {
52 cached_resource_dir = std::move(result);
53 }
54 }
55 }
56
57 return cached_resource_dir;
58}
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: