0

I am trying to build llvm from source using Cmake. I have an error coming when Cmake is trying to build it : Unknown CMake command "add_llvm_tool".

I don't know why there is this error, here is my CMakeLists.txt file

cmake_minimum_required(VERSION 3.2) set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} Core Object Support ) add_llvm_tool(llvm-nm llvm-nm.cpp ) 

1 Answer 1

2

You need to include(AddLLVM.cmake) to have this macro defined.

Sign up to request clarification or add additional context in comments.

2 Comments

I have to include it in my CMakeLists.txt ?
@Anatch Yes. .cmake files usually contain macro definitions that get used in CMakeLists.txt files

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.