Unable to install clang libc++abi

Hi,

I am building clang and libc++abi from sources on Fedora.

My llvm, clang and libc++ installation is complete. However, when I try to build libc++abi, I get this error:

swadnerkar@localhost:~/llvm/projects/libcxxabi/build (master %) $ CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release …
CMake Error at CMakeLists.txt:35 (add_llvm_external_project):
Unknown CMake command “add_llvm_external_project”.

CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.5)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run “cmake --help-policy CMP0000”.
This warning is for project developers. Use -Wno-dev to suppress it.

– Configuring incomplete, errors occurred!
See also “/home/swadnerkar/llvm/projects/libcxxabi/CMakeFiles/CMakeOutput.log”.

The LLVM Cmake modules are installed here:
/usr/local/lib/cmake/llvm/LLVMExternalProjectUtils.cmake

How do I make cmake use these
I tried this:
export CMAKE_PREFIX_PATH=/usr/local/

But, it did not work.

Could someone help me install libc++abi, please?

Thank you
Salil

Hi,

If I understand correctly, the problem is that you need to give cmake the path to the llvm source dir, not libcxxabi source dir. When invoking make, you can chose to build just libcxxabi (make cxxabi).

Hope this helps.

/ Asiri