cmake errors with lldb on Windows 7


I am not sure if lldb is supposed to work on Windows. I am using cmake 2.8.12 with latest svn lldb, llvm, clang.

Before checking out lldb the llvm+clang projects build OK.
After checking out lldb into tools\lldb, cmake fails on lldb CMakeLists.txt:



– Configuring done
CMake Error:
Error evaluating generator expression:


$<LINK_ONLY> expression requires exactly one parameter.

CMake Warning (dev) in tools/lldb/source/CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run “cmake --help-policy CMP0022” for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

Static library target “liblldb” has a INTERFACE_LINK_LIBRARIES property.
This should be preferred as the source of the link interface for this
library. Ignoring the property and using the link implementation as the
link interface instead.
This warning is for project developers. Use -Wno-dev to suppress it.

should this error be ignored or fixed somehow?


Hi Yaron,

Ive not tried latest svn in about a week so cannot comment on the LINK_ONLY issue you have just yet, but you need to use the latest Visual Studio 12 generator - VS11 does not have the required cxx11 features to compile trunk. I'm using cmake

Also, lldb on windows is only the frontend driver+core, as to allow for remote debugging. There is no (full) windows platform for local debugging just yet.

I'll try to grab svn latest and build now.


Hi Yaron,

Just tried creating an sln with latest llvm/clang/lldb using the Visual Studio 12 Win64 Generator and had no cmake errors. This is just with default configuration, target X86 with llvm asserts enabled. Do you have any other non-standard options?


Hi Colin,

The error happens while processing the cmake files, even when running without any configuration

cmake -G “Visual Studio 11” …

it may be related to generator or maybe cmake version, as the cmake help says:

cmake --help-policy CMP0022
cmake version 2.8.12
INTERFACE_LINK_LIBRARIES defines the link interface.

CMake 2.8.11 constructed the ‘link interface’ of a target from
properties matching (IMPORTED_)?LINK_INTERFACE_LIBRARIES()?.
The modern way to specify config-sensitive content is to use generator
expressions and the IMPORTED
prefix makes uniform processing of the
link interface with generator expressions impossible. The
INTERFACE_LINK_LIBRARIES target property was introduced as a
replacement in CMake 2.8.12. This new property is named consistently
and INTERFACE_COMPILE_OPTIONS properties. For in-build targets, CMake
will use the INTERFACE_LINK_LIBRARIES property as the source of the
link interface only if policy CMP0022 is NEW. When exporting a target
which has this policy set to NEW, only the INTERFACE_LINK_LIBRARIES
property will be processed and generated for the IMPORTED target by
default. A new option to the install(EXPORT) and export commands
allows export of the old-style properties for compatibility with
downstream users of CMake versions older than 2.8.12. The
target_link_libraries command will no longer populate the properties
matching LINK_INTERFACE_LIBRARIES(_)? if this policy is NEW.

The OLD behavior for this policy is to ignore the
INTERFACE_LINK_LIBRARIES property for in-build targets. The NEW
behavior for this policy is to use the INTERFACE_LINK_LIBRARIES
property for in-build targets, and ignore the old properties matching

This policy was introduced in CMake version 2.8.12. CMake version
2.8.12 warns when the policy is not set and uses OLD behavior. Use
the cmake_policy command to set it to OLD or NEW explicitly.

In any case, I was looking for a local debug solution. I hope lldb would do that sometime.