Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only add include directories for LLVM, clang & rapidjson if they are …
…not in CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES /usr/include/c++/9 comes before /usr/include in `{clang,gcc} -v -fsyntax-only -xc++ /dev/null`. target_include_directories(ccls SYSTEM PRIVATE ${RapidJSON_INCLUDE_DIRS}) If ${RapidJSON_INCLUDE_DIRS} resolves to /usr/include, /usr/include will be shuffled before /usr/include/c++/9 and will cause `#include_next <stdlib.h>` issues (see MaskRay#417). Check if the include directories are already in CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES.
- Loading branch information