[PATCH] D40050: CMake: Turn LLVM_ENABLE_LIBXML2 into a tri-state option

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 14:32:40 PST 2017


hans added inline comments.


================
Comment at: cmake/config-ix.cmake:163
   set(LIBXML2_FOUND 0)
   if((LLVM_ENABLE_LIBXML2) AND ((CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH) OR APPLE))
     find_package(LibXml2)
----------------
rnk wrote:
> I guess the string value OFF evaluates to false in this context? Scary loose typing, batman!
Yup, also "0, OFF, NO, FALSE, N, IGNORE, NOTFOUND, the empty string, or ends in the suffix -NOTFOUND" :-)
https://cmake.org/cmake/help/v3.0/command/if.html


https://reviews.llvm.org/D40050





More information about the llvm-commits mailing list