[PATCH] D26255: [cmake] Rename HAVE_DIA_SDK to LLVM_ENABLE_DIA_SDK, and expose in LLVMConfig

Michał Górny via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 5 00:42:47 PDT 2016


mgorny added inline comments.


================
Comment at: include/llvm/Config/config.h.cmake:42
 /* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */
-#cmakedefine01 HAVE_DIA_SDK
+#define HAVE_DIA_SDK ${LLVM_ENABLE_DIA_SDK}
 
----------------
zturner wrote:
> What's the difference between `#cmakedefine01` and the syntax you've used here?
1. `#cmakedefine01` converts any CMake bool to 0/1, mine relies on the 0/1 being set in CMake (it was already done like this).
2. `#cmakedefine01` does not support different `#define` and CMake variable name (or at least doesn't mention it in the docs). So if I were to continue using `#cmakedefine01`, I'd either have to define additional `HAVE_DIA_SDK` var in CMake, or rename the `#define`.


https://reviews.llvm.org/D26255





More information about the llvm-commits mailing list