MayaFlux 0.2.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 31 of file HostEnvironment.cpp.

32{
33 static std::string cached_resource_dir;
34
35 if (cached_resource_dir.empty()) {
36 const char* cmd = "clang -print-resource-dir";
37 auto result = exec_command(cmd);
38 trim_output(result);
39
40 if (!result.empty()
41 && (result.find("error:") == std::string::npos)
42 && (result.find("clang") != std::string::npos
43 || result.find("lib") != std::string::npos
44 || fs::exists(result))) {
45 {
46 cached_resource_dir = std::move(result);
47 }
48 }
49 }
50
51 return cached_resource_dir;
52}
static void trim_output(std::string &str)
static std::string exec_command(const char *cmd)

References 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: