This commit adds additional logic to only add the headers of LLVM, clang and
rapidjson if they are not already in the compiler's default search path.
The issue was, that adding the same folder via:
target_include_directories(tgt SYSTEM ${foo})
results in the following invocation of gcc:
gcc -isystem $foo ...
which causes issues with libstdc++ shipped by gcc9. libstdc++ makes use of
#include_next for some internal trickery, but that changes the way headers are
resolved and causes compilation failures because standard headers are now
suddenly missing.
With this commit we now check each of the extra include directories if they are
already in the compiler's search path. If they are, we don't add them and
circumvent this issue.
Combined Daan De Meyer's #227 with other simplification
* USE_SHARED_LLVM is deleted in favor of LLVM_LINK_LLVM_DYLIB
* LLVM_ENABLE_RTTI is deleted as it is provided by LLVMConfig.cmake
* Only direct Clang/LLVM dependencies are required in target_link_libraries
* Restrict -DCLANG_RESOURCE_DIRECTORY= to src/utils.cc
* WorkingFiles::files : vector -> unordered_map
* Add timestamp to WorkingFile
* Rename "comp-preload" thread to "preamble"
* Rename CompletionManager to SemaManager as it is used by "diag" "comp" "preamble"
* Rename clang_complete.* to sema_manager.*
* Merge SemaManager::{preloads,sessions}
* Add initialization option session.maxNum
* In DiagnosticMain, if an included file was modified, cancel the DiagTask and create a PreambleTask instead. The task sets `from_diag` so as to trigger immediate DiagTask after the preamble is built.
Delete method.{cc,h}
Rename $ccls/setSkippedRanges to $ccls/publishSkippedRanges
Rename $ccls/publishSemanticHighlighting to $ccls/publishSemanticHighlight; stableId -> id
* Better LanguageId detection with clangDriver (e.g. .cu -> types::TY_CUDA)
* fallback when there is no .ccls or compile_commands.json
Also Hide clangTooling options from --help
$ccls/reload is renamed from $ccls/freshenIndex
This is useful when DB (merged index) diverges from backing IndexFile.
Also fix a semantic highlighting bug.
1. libClangDriver.a shipped by MSYS2 needs -lversion which is not
included in CMAKE_CXX_STANDARD_LIBRARIES by default.
2. Use string literal for DEFAULT_RESOURCE_DIRECTORY to support
backslashes in path.