Changeset: d17689b2c752 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d17689b2c752
Modified Files:
cmake/monetdb-findpackages.cmake
gdk/gdk.h
monetdb_config.h.in
Branch: default
Log Message:
Move checking for new enough xxhash library into cmake.
diffs (52 lines):
diff --git a/cmake/monetdb-findpackages.cmake b/cmake/monetdb-findpackages.cmake
--- a/cmake/monetdb-findpackages.cmake
+++ b/cmake/monetdb-findpackages.cmake
@@ -18,6 +18,7 @@ if(${XXHASH_VERSION} VERSION_GREATER_EQU
# with version at least 0.8.0 we inline all xxhash functions so we
# don't need the library
set(XXHASH_LDFLAGS "")
+ set(XXH_INLINE_ALL 1)
endif()
find_package(Python3 COMPONENTS Interpreter Development)
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -111,22 +111,9 @@
# include <sys/mman.h>
#endif
-/* the compiler on the Mac can't deal with including xxhash.h twice
- * because of identical redefinitions of types and we happen to know
- * that the xxhash version is high enough, so just define the magic
- * inline token and include the file only once */
-#ifndef __APPLE__
+/* we've defined XXH_INLINE_ALL in monetdb_config.h if the xxhash
+ * library is new enough */
#include <xxhash.h>
-#endif
-
-#if defined(__APPLE__) || XXH_VERSION_NUMBER >= 0*100*100 + 8*100 + 0 /* at
least 0.8.0 */
-/* in newer versions, we can define XXH_INLINE_ALL to inline all hash
- * functions before including xxhash.h again (we didn't need the first
- * include, except we need the version number to make the
- * distinction) */
-#define XXH_INLINE_ALL
-#include <xxhash.h>
-#endif
#include "matomic.h"
#include "mstring.h"
diff --git a/monetdb_config.h.in b/monetdb_config.h.in
--- a/monetdb_config.h.in
+++ b/monetdb_config.h.in
@@ -208,6 +208,9 @@
#cmakedefine WITH_TCMALLOC 1
#cmakedefine WITH_MALLOC "@WITH_MALLOC@"
+// with new enough xxhash library we can inline everything
+#cmakedefine XXH_INLINE_ALL 1
+
#cmakedefine SANITIZER 1 /* address sanitizer */
#cmakedefine UNDEFINED 1 /* undefined behavior sanitizer */
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]