[llvm-commits] [llvm] r110753 - in /llvm/trunk/include/llvm/Config: config.h.cmake llvm-config.h.cmake
Oscar Fuentes
ofv at wanadoo.es
Tue Aug 10 16:48:22 PDT 2010
Author: ofv
Date: Tue Aug 10 18:48:22 2010
New Revision: 110753
URL: http://llvm.org/viewvc/llvm-project?rev=110753&view=rev
Log:
Avoid multiple definition warnings when both config.h and
llvm-config.h are included.
This is the cmake counterpart of r110547. See bug #7809.
Modified:
llvm/trunk/include/llvm/Config/config.h.cmake
llvm/trunk/include/llvm/Config/llvm-config.h.cmake
Modified: llvm/trunk/include/llvm/Config/config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.cmake?rev=110753&r1=110752&r2=110753&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Config/config.h.cmake (original)
+++ llvm/trunk/include/llvm/Config/config.h.cmake Tue Aug 10 18:48:22 2010
@@ -3,6 +3,9 @@
** Created by Kevin from config.h.in **
***************************************/
+#ifndef CONFIG_H
+#define CONFIG_H
+
/* Define if dlopen(0) will open the symbols of the program */
#undef CAN_DLOPEN_SELF
@@ -628,3 +631,5 @@
/* Native LLVM architecture, short name */
#cmakedefine LLVM_NATIVE_ARCHNAME ${LLVM_NATIVE_ARCH}
+
+#endif
Modified: llvm/trunk/include/llvm/Config/llvm-config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/llvm-config.h.cmake?rev=110753&r1=110752&r2=110753&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Config/llvm-config.h.cmake (original)
+++ llvm/trunk/include/llvm/Config/llvm-config.h.cmake Tue Aug 10 18:48:22 2010
@@ -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
More information about the llvm-commits
mailing list