summaryrefslogtreecommitdiff
path: root/include/llvm/Config/llvm-config.h.cmake
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2010-08-10 23:48:22 +0000
committerOscar Fuentes <ofv@wanadoo.es>2010-08-10 23:48:22 +0000
commit0a16b22e64336d01967bc2a25c7c3a3bde0358af (patch)
tree50b5f534bdabab82436925023b5729c0cfa7cac6 /include/llvm/Config/llvm-config.h.cmake
parente41d90094c9dbbabd6031957689f67ea504ed616 (diff)
downloadllvm-0a16b22e64336d01967bc2a25c7c3a3bde0358af.tar.gz
llvm-0a16b22e64336d01967bc2a25c7c3a3bde0358af.tar.bz2
llvm-0a16b22e64336d01967bc2a25c7c3a3bde0358af.tar.xz
Avoid multiple definition warnings when both config.h and
llvm-config.h are included. This is the cmake counterpart of r110547. See bug #7809. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Config/llvm-config.h.cmake')
-rw-r--r--include/llvm/Config/llvm-config.h.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Config/llvm-config.h.cmake b/include/llvm/Config/llvm-config.h.cmake
index c277ef2b20..b68592a64a 100644
--- a/include/llvm/Config/llvm-config.h.cmake
+++ b/include/llvm/Config/llvm-config.h.cmake
@@ -11,6 +11,11 @@
they can be in exported headers and won't override package specific
directives. This is a C file so we can include it in the llvm-c headers. */
+/* To avoid multiple inclusions of these variables when we include the exported
+ headers and config.h, conditionally include these. */
+/* TODO: This is a bit of a hack. */
+#ifndef CONFIG_H
+
/* Installation directory for binary executables */
#cmakedefine LLVM_BINDIR "${LLVM_BINDIR}"
@@ -82,3 +87,5 @@
/* Installation prefix directory */
#cmakedefine LLVM_PREFIX "${LLVM_PREFIX}"
+
+#endif