How to use LLVM's libcxx & libcxxabi in cmake

2019-08-23 03:12发布

问题:

Currently I'm running Debian stretch with the system's default compiler GCC 6.3.0. But I have a project using cmake (ceph's master branch) that depends on C++17, which requires non default includes and libraries. So I decided to use Clang/LLVM to build it. I downloaded and installed Clang/LLVM, compiled it and installed it below /usr/local.

Now my question is, how to instruct cmake to use the includes from /usr/local/include/c++/v1/ and the libraries from /usr/local/lib?