Tay Ray Chuan home archive

skipping tools when building LLVM with CMake

Tue, 1 Apr 2014 12:56:40 +0800 | Filed under llvm

I had added the Polly project to my LLVM source tree. But I didn't want to build it this time. git-grep of Polly showed only one mention in tools/CMakeLists.txt:


Yet even after commenting out the line, build files were still being generated for Polly. It turns out the lines just below it had a role to play:

# Automatically add remaining sub-directories containing a 'CMakeLists.txt'
# file as external projects.

Convenient, but not good for us. Digging through the cmake files, I came up with this:


This applies generally to other tools/projects in the tools/ directory you don't want LLVM to pick up automatically during the build (eg. lldb).


blog comments powered by Disqus