[llvm-dev] change in CMake variable names breaks existing uses and does not conform to CMake conventions

Mueller-Roemer, Johannes Sebastian via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 1 04:31:52 PDT 2016

Hi Chris and everyone else,

I just noticed that some of my builds broke due to commit 280013, as LLVM_INCLUDE_DIRS was renamed to LLVM_INCLUDE_DIR. In and of itself, not much of an issue as the fix is just to remove one character (in a couple of places). However, I would like to discuss if this rename is desirable at all. Sure, in-tree LLVM_INCLUDE_DIR is used everywhere, however not providing an ${NAME}_INCLUDE_DIRS variable goes against CMake conventions. See for example the find scripts included with CMake itself:

https://cmake.org/cmake/help/v3.6/module/FindZLIB.html -> provides ZLIB_INCLUDE_DIRS (and not ZLIB_INCLUDE_DIR) even though it is typically only one directory

And the same holds true for most  other Find${NAME}.cmake scripts I had a look at (Boost, Bullet, CUDA, Freetype, XMLRPC, Zlib). I'll admit there are 1 or 2 exceptions (such as OpenGL) but in general I think it would be better to stick to the more common/conventional case.



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<mailto:johannes.mueller-roemer at igd.fraunhofer.de> | www.igd.fraunhofer.de<http://www.igd.fraunhofer.de>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160901/30b86c2c/attachment.html>

More information about the llvm-dev mailing list