Only use -I../../include if this is cling (ancient ROOT-4455).

This commit is contained in:
Axel Naumann 2016-07-21 19:33:04 +02:00 committed by sftnight
parent d9eea3590b
commit 77bbfc0020

View File

@ -308,7 +308,9 @@ namespace cling {
AddIncludePath(InclPaths);
#endif
llvm::SmallString<512> P(GetExecutablePath(argv0));
if (!P.empty()) {
if (!P.empty()
&& llvm::StringRef(argv0).endswith("cling")
&& llvm::sys::path::filename(P) == "cling") {
// Remove /cling from foo/bin/clang
llvm::StringRef ExeIncl = llvm::sys::path::parent_path(P);
// Remove /bin from foo/bin