CMake Warning: Manually-specified variables

During a build I get:

CMake Warning:
  Manually-specified variables were not used by the project:


Here’s my CMake invocation:

cmake -S llvm -B /path/to/llvm-build -G Ninja -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/path/to/dev/clang \
        -DLLVM_ENABLE_PROJECTS="clang;lld" \
        -DLLVM_ENABLE_RUNTIMES="openmp;libcxx;libcxxabi" \

Should I just go on disregarding CMake warnings?

LLVM_ENABLE_RUNTIMES will add a couple of CMake variables when it invokes the runtime build. Since that invocation is generic to every runtime project in LLVM, it has some variables that are not used by OpenMP. Simply ignore them.

1 Like

It is a little annoying though. Is it possible to make the runtimes invocation pass --no-warn-unused-cli to CMake?

That is feasible.

I pushed a patch to hopefully fix this. Runtimes now passes -no-warn-unused-cli.