|
|
|
@ -123,6 +123,14 @@ std::vector<std::string> CompileCommands::get_arguments(const boost::filesystem: |
|
|
|
arguments.emplace_back(resource_path); |
|
|
|
arguments.emplace_back(resource_path); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __APPLE__ |
|
|
|
|
|
|
|
// Add -isysroot argument if it is missing on MacOS, which is needed by newer libclang
|
|
|
|
|
|
|
|
if(std::none_of(arguments.begin(), arguments.end(), [](const std::string &argument) { return argument == "-isysroot"; })) { |
|
|
|
|
|
|
|
arguments.emplace_back("-isysroot"); |
|
|
|
|
|
|
|
arguments.emplace_back("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
// Do not add -fretain-comments-from-system-headers if pch is used, since the pch was most likely made without this flag
|
|
|
|
// Do not add -fretain-comments-from-system-headers if pch is used, since the pch was most likely made without this flag
|
|
|
|
if(std::none_of(arguments.begin(), arguments.end(), [](const std::string &argument) { return argument == "-include-pch"; })) |
|
|
|
if(std::none_of(arguments.begin(), arguments.end(), [](const std::string &argument) { return argument == "-include-pch"; })) |
|
|
|
arguments.emplace_back("-fretain-comments-from-system-headers"); |
|
|
|
arguments.emplace_back("-fretain-comments-from-system-headers"); |
|
|
|
|