Changeset: 7854899d6322 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7854899d6322
Added Files:
        monetdb5/CMakeLists.txt
        monetdb5/extras/CMakeLists.txt
        monetdb5/extras/mal_optimizer_template/CMakeLists.txt
        monetdb5/mal/CMakeLists.txt
        monetdb5/modules/CMakeLists.txt
        monetdb5/modules/atoms/CMakeLists.txt
        monetdb5/modules/kernel/CMakeLists.txt
        monetdb5/modules/mal/CMakeLists.txt
        monetdb5/optimizer/CMakeLists.txt
        monetdb5/scheduler/CMakeLists.txt
        monetdb5/tools/CMakeLists.txt
        monetdb5/tools/monetdb.c
Modified Files:
        CMakeLists.txt
        cmake/monetdb_config.h.in
        gdk/CMakeLists.txt
        monetdb5/mal/mal_atom.c
        monetdb5/modules/kernel/alarm.c
Branch: cmake-fun
Log Message:

Libmonetdb5 compiles.


diffs (truncated from 546 to 300 lines):

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -927,6 +927,9 @@ if(NOT ${WITH_UUID} STREQUAL "NO")
        set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES};uuid")
        check_symbol_exists("uuid_generate" "uuid/uuid.h" HAVE_UUID)
        set(CMAKE_REQUIRED_LIBRARIES "${PREV_CMAKE_REQUIRED_LIBRARIES}")
+       if(HAVE_UUID)
+               set(UUID_LIBRARIES "uuid")
+       endif()
 endif()
 
 # OpenSSL or CommonCrypto library
@@ -1938,13 +1941,13 @@ add_subdirectory(clients)
 if(HAVE_GDK)
        add_subdirectory(gdk)
 endif()
-#[[if(HAVE_MONETDB5)
+if(HAVE_MONETDB5)
        add_subdirectory(monetdb5)
 endif()
 if(HAVE_SQL)
        add_subdirectory(sql)
 endif()
-if(HAVE_GEOM)
+#[[if(HAVE_GEOM)
        add_subdirectory(geom)
 endif()
 add_subdirectory(tools)
diff --git a/cmake/monetdb_config.h.in b/cmake/monetdb_config.h.in
--- a/cmake/monetdb_config.h.in
+++ b/cmake/monetdb_config.h.in
@@ -16,6 +16,7 @@
 /* C99 standard includes */
 #include <stdio.h>
 #include <stdlib.h>
+#include <stddef.h>
 #include <errno.h>
 #include <stdarg.h>
 #include <inttypes.h>
diff --git a/gdk/CMakeLists.txt b/gdk/CMakeLists.txt
--- a/gdk/CMakeLists.txt
+++ b/gdk/CMakeLists.txt
@@ -8,7 +8,7 @@
 
 include_directories(../common/options ../common/stream ../common/utils 
${VALGRIND_INCLUDE_DIR})
 
-add_library(gdk SHARED
+add_library(bat SHARED
                        gdk_select.c
                        gdk_calc.c gdk_calc.h gdk_calc_compare.h 
gdk_calc_private.h
                        gdk_ssort.c gdk_ssort_impl.h
@@ -33,8 +33,8 @@ add_library(gdk SHARED
                        gdk_firstn.c
                        gdk_analytic_bounds.c
                        gdk_analytic_func.c gdk_analytic.h)
-add_dependencies(gdk moptions mutils stream)
-target_link_libraries(gdk moptions mutils stream ${MATH_LIBS} 
${SOCKET_LIBRARIES} ${MALLOC_LIBS} ${PTHREAD_LIBRARIES}
+add_dependencies(bat moptions mutils stream)
+target_link_libraries(bat moptions mutils stream ${MATH_LIBS} 
${SOCKET_LIBRARIES} ${MALLOC_LIBS} ${PTHREAD_LIBRARIES}
                                          ${DL_LIBS})
-set_target_properties(gdk PROPERTIES COMPILE_DEFINITIONS "LIBGDK")
-set_target_properties(gdk PROPERTIES VERSION ${GDK_VERSION} SOVERSION 
${GDK_VERSION_MAJOR})
+set_target_properties(bat PROPERTIES COMPILE_DEFINITIONS "LIBGDK")
+set_target_properties(bat PROPERTIES VERSION ${GDK_VERSION} SOVERSION 
${GDK_VERSION_MAJOR})
diff --git a/monetdb5/CMakeLists.txt b/monetdb5/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/monetdb5/CMakeLists.txt
@@ -0,0 +1,17 @@
+#[[
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
+#]]
+
+add_subdirectory(mal)
+add_subdirectory(modules)
+add_subdirectory(optimizer)
+add_subdirectory(scheduler)
+add_subdirectory(tools)
+add_subdirectory(extras)
+if(WIN32)
+       add_subdirectory(NT)
+endif()
diff --git a/monetdb5/extras/CMakeLists.txt b/monetdb5/extras/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/monetdb5/extras/CMakeLists.txt
@@ -0,0 +1,12 @@
+#[[
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
+#]]
+
+add_subdirectory(mal_optimizer_template)
+#if(HAVE_LIBR)
+#      add_subdirectory(rapi)
+#endif()
diff --git a/monetdb5/extras/mal_optimizer_template/CMakeLists.txt 
b/monetdb5/extras/mal_optimizer_template/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/monetdb5/extras/mal_optimizer_template/CMakeLists.txt
@@ -0,0 +1,13 @@
+#[[
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
+#]]
+
+include_directories(../../optimizer ../../mal ../../../gdk 
../../../common/stream ../../../common/options)
+
+add_library(opt_sql_append MODULE opt_sql_append.c opt_sql_append.h)
+add_dependencies(opt_sql_append monetdb5 bat)
+target_link_libraries(opt_sql_append monetdb5 bat)
diff --git a/monetdb5/mal/CMakeLists.txt b/monetdb5/mal/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/monetdb5/mal/CMakeLists.txt
@@ -0,0 +1,45 @@
+#[[
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
+#]]
+
+include_directories(. ../../common/options ../../common/stream 
../../common/utils ../../clients/mapilib ../../gdk
+                                       ../optimizer ../modules/mal 
${OPENSSL_INCS})
+
+add_library(mal STATIC
+                       mal.c mal.h
+                       mal_atom.c mal_atom.h
+                       mal_authorize.c mal_authorize.h
+                       mal_builder.c mal_builder.h
+                       mal_client.c mal_client.h
+                       mal_debugger.c mal_debugger.h
+                       mal_errors.h
+                       mal_exception.c mal_exception.h
+                       mal_factory.c mal_factory.h
+                       mal_function.c mal_function.h
+                       mal_import.c mal_import.h
+                       mal_runtime.c mal_runtime.h
+                       mal_instruction.c mal_instruction.h
+                       mal_resource.c mal_resource.h
+                       mal_interpreter.c mal_interpreter.h
+                       mal_dataflow.c mal_dataflow.h
+                       mal_linker.c mal_linker.h
+                       mal_listing.c mal_listing.h
+                       mal_module.c mal_module.h
+                       mal_namespace.c mal_namespace.h
+                       mal_parser.c mal_parser.h
+                       mal_profiler.c mal_profiler.h
+                       mal_readline.c mal_readline.h
+                       mal_resolve.c mal_resolve.h
+                       mal_sabaoth.c mal_sabaoth.h
+                       mal_scenario.c mal_scenario.h
+                       mal_session.c mal_session.h
+                       mal_stack.c mal_stack.h
+                       mal_type.c mal_type.h
+                       mal_utils.c mal_utils.h
+                       mal_private.h)
+
+set_target_properties(mal PROPERTIES COMPILE_DEFINITIONS "LIBMAL")
diff --git a/monetdb5/mal/mal_atom.c b/monetdb5/mal/mal_atom.c
--- a/monetdb5/mal/mal_atom.c
+++ b/monetdb5/mal/mal_atom.c
@@ -47,14 +47,14 @@ malAtomProperty(MalBlkPtr mb, InstrPtr p
        switch (name[0]) {
        case 'd':
                if (idcmp("del", name) == 0 && pci->argc == 1) {
-                       BATatoms[tpe].atomDel = (void (*)(Heap *, var_t 
*))pci->fcn;
+                       BATatoms[tpe].atomDel = (void (*)(Heap *, var_t *)) 
(void*) pci->fcn;
                        setAtomName(pci);
                        return MAL_SUCCEED;
                }
                break;
        case 'c':
                if (idcmp("cmp", name) == 0 && pci->argc == 1) {
-                       BATatoms[tpe].atomCmp = (int (*)(const void *, const 
void *))pci->fcn;
+                       BATatoms[tpe].atomCmp = (int (*)(const void *, const 
void *)) (void*) pci->fcn;
                        BATatoms[tpe].linear = true;
                        setAtomName(pci);
                        return MAL_SUCCEED;
@@ -62,12 +62,12 @@ malAtomProperty(MalBlkPtr mb, InstrPtr p
                break;
        case 'f':
                if (idcmp("fromstr", name) == 0 && pci->argc == 1) {
-                       BATatoms[tpe].atomFromStr = (ssize_t (*)(const char *, 
size_t *, ptr *, bool))pci->fcn;
+                       BATatoms[tpe].atomFromStr = (ssize_t (*)(const char *, 
size_t *, ptr *, bool)) (void*) pci->fcn;
                        setAtomName(pci);
                        return MAL_SUCCEED;
                }
                if (idcmp("fix", name) == 0 && pci->argc == 1) {
-                       BATatoms[tpe].atomFix = (int (*)(const void *))pci->fcn;
+                       BATatoms[tpe].atomFix = (int (*)(const void *)) (void*) 
pci->fcn;
                        setAtomName(pci);
                        return MAL_SUCCEED;
                }
@@ -77,19 +77,19 @@ malAtomProperty(MalBlkPtr mb, InstrPtr p
                        /* heap function makes an atom varsized */
                        BATatoms[tpe].size = sizeof(var_t);
                        assert_shift_width(ATOMelmshift(ATOMsize(tpe)), 
ATOMsize(tpe));
-                       BATatoms[tpe].atomHeap = (void (*)(Heap *, 
size_t))pci->fcn;
+                       BATatoms[tpe].atomHeap = (void (*)(Heap *, size_t)) 
(void*) pci->fcn;
                        setAtomName(pci);
                        return MAL_SUCCEED;
                }
                if (idcmp("hash", name) == 0 && pci->argc == 1) {
-                       BATatoms[tpe].atomHash = (BUN (*)(const void 
*))pci->fcn;
+                       BATatoms[tpe].atomHash = (BUN (*)(const void *)) 
(void*) pci->fcn;
                        setAtomName(pci);
                        return MAL_SUCCEED;
                }
                break;
        case 'l':
                if (idcmp("length", name) == 0 && pci->argc == 1) {
-                       BATatoms[tpe].atomLen = (size_t (*)(const void 
*))pci->fcn;
+                       BATatoms[tpe].atomLen = (size_t (*)(const void *)) 
(void*) pci->fcn;
                        setAtomName(pci);
                        return MAL_SUCCEED;
                }
@@ -103,35 +103,35 @@ malAtomProperty(MalBlkPtr mb, InstrPtr p
                        return MAL_SUCCEED;
                }
                if (idcmp("nequal", name) == 0 && pci->argc == 1) {
-                       BATatoms[tpe].atomCmp = (int (*)(const void *, const 
void *))pci->fcn;
+                       BATatoms[tpe].atomCmp = (int (*)(const void *, const 
void *)) (void*) pci->fcn;
                        setAtomName(pci);
                        return MAL_SUCCEED;
                }
                break;
        case 'p':
                if (idcmp("put", name) == 0 && pci->argc == 1) {
-                       BATatoms[tpe].atomPut = (var_t (*)(Heap *, var_t *, 
const void *))pci->fcn;
+                       BATatoms[tpe].atomPut = (var_t (*)(Heap *, var_t *, 
const void *)) (void*) pci->fcn;
                        setAtomName(pci);
                        return MAL_SUCCEED;
                }
                break;
        case 's':
                if (idcmp("storage", name) == 0 && pci->argc == 1) {
-                       BATatoms[tpe].storage = (*(int (*)(void))pci->fcn)();
+                       BATatoms[tpe].storage = (*(int (*)(void)) (void*) 
pci->fcn)();
                        setAtomName(pci);
                        return MAL_SUCCEED;
                }
                break;
        case 't':
                if (idcmp("tostr", name) == 0 && pci->argc == 1) {
-                       BATatoms[tpe].atomToStr = (ssize_t (*)(str *, size_t *, 
const void *, bool))pci->fcn;
+                       BATatoms[tpe].atomToStr = (ssize_t (*)(str *, size_t *, 
const void *, bool)) (void*) pci->fcn;
                        setAtomName(pci);
                        return MAL_SUCCEED;
                }
                break;
        case 'u':
                if (idcmp("unfix", name) == 0 && pci->argc == 1) {
-                       BATatoms[tpe].atomUnfix = (int (*)(const void 
*))pci->fcn;
+                       BATatoms[tpe].atomUnfix = (int (*)(const void *)) 
(void*) pci->fcn;
                        setAtomName(pci);
                        return MAL_SUCCEED;
                }
@@ -145,7 +145,7 @@ malAtomProperty(MalBlkPtr mb, InstrPtr p
                break;
        case 'w':
                if (idcmp("write", name) == 0 && pci->argc == 1) {
-                       BATatoms[tpe].atomWrite = (gdk_return (*)(const void *, 
stream *, size_t))pci->fcn;
+                       BATatoms[tpe].atomWrite = (gdk_return (*)(const void *, 
stream *, size_t)) (void*) pci->fcn;
                        setAtomName(pci);
                        return MAL_SUCCEED;
                }
diff --git a/monetdb5/modules/CMakeLists.txt b/monetdb5/modules/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/CMakeLists.txt
@@ -0,0 +1,11 @@
+#[[
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
+#]]
+
+add_subdirectory(atoms)
+add_subdirectory(kernel)
+add_subdirectory(mal)
diff --git a/monetdb5/modules/atoms/CMakeLists.txt 
b/monetdb5/modules/atoms/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/atoms/CMakeLists.txt
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to