[llvm-dev] Extra space in LLVM_DEFINITIONS causes CMake 3.1 to fail

Mueller-Roemer, Johannes Sebastian via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 6 00:35:52 PDT 2015

LLVM_DEFINITIONS used to be defined as


Now it is defined as


(note that it is no longer a cmake list but a string, and the string contains a leading space!)

This causes CMake 3.1 to emit


when LLVM_DEFINITIONS is used via target_compile_definitions. Which, unsurprisingly, fails.

Although this issue is fixed in current CMake versions (3.2+), do we really want to require these versions just to have LLVM_DEFINITIONS defined as a string instead of a list? A simple check if LLVM_DEFINITIONS is empty in add_llvm_definitions might solve the issue.

Johannes S. Mueller-Roemer, MSc
Wiss. Mitarbeiter - Interactive Engineering Technologies (IET)

Fraunhofer-Institut für Graphische Datenverarbeitung IGD
Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
Tel +49 6151 155-606  |  Fax +49 6151 155-139
johannes.mueller-roemer at igd.fraunhofer.de  |  www.igd.fraunhofer.de

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151006/552fa829/attachment.html>

More information about the llvm-dev mailing list