Changeset: 12eb96266996 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=12eb96266996 Added Files: CMakeLists.txt Config.cmake.in README.md Release.md clients/CMakeLists.txt clients/examples/C/CMakeLists.txt clients/examples/CMakeLists.txt clients/examples/perl/CMakeLists.txt clients/examples/php/CMakeLists.txt clients/mapiclient/CMakeLists.txt clients/mapilib/CMakeLists.txt clients/odbc/CMakeLists.txt clients/odbc/driver/CMakeLists.txt clients/odbc/samples/CMakeLists.txt clients/odbc/setup/CMakeLists.txt clients/odbc/winsetup/CMakeLists.txt cmake/Modules/FindCFitsIO.cmake cmake/Modules/FindCommonCrypto.cmake cmake/Modules/FindGeos.cmake cmake/Modules/FindGetopt.cmake cmake/Modules/FindKVM.cmake cmake/Modules/FindLZ4.cmake cmake/Modules/FindLibR.cmake cmake/Modules/FindLiblas.cmake cmake/Modules/FindLidar.cmake cmake/Modules/FindLzma.cmake cmake/Modules/FindNetCDF.cmake cmake/Modules/FindNumPy.cmake cmake/Modules/FindPCRE.cmake cmake/Modules/FindProj.cmake cmake/Modules/FindReadline.cmake cmake/Modules/FindSnappy.cmake cmake/Modules/FindUUID.cmake cmake/Modules/FindValgrind.cmake cmake/Toolchains/linux-clang.cmake cmake/Toolchains/linux-gnu.cmake cmake/Toolchains/linux-icc.cmake cmake/monetdb-custom-targets.cmake cmake/monetdb-deb-packages.cmake cmake/monetdb-defines.cmake cmake/monetdb-findpackages.cmake cmake/monetdb-functions.cmake cmake/monetdb-options.cmake cmake/monetdb-packages.cmake cmake/monetdb-rpm-packages.cmake cmake/monetdb-toolchain.cmake cmake/monetdb-versions.cmake cmake/os_release_info.cmake common/CMakeLists.txt common/options/CMakeLists.txt common/stream/CMakeLists.txt common/utils/CMakeLists.txt common/utils/monetdb_hgversion.h.in create_include_object.py.in ctest/CMakeLists.txt ctest/cmake/CMakeLists.txt ctest/cmake/detect-bz2.cmake ctest/cmake/detect-commoncrypto.cmake ctest/cmake/detect-curl.cmake ctest/cmake/detect-fits.cmake ctest/cmake/detect-gdal.cmake ctest/cmake/detect-geos.cmake ctest/cmake/detect-getaddrinfo.cmake ctest/cmake/detect-iconv.cmake ctest/cmake/detect-libpy3.cmake ctest/cmake/detect-libr.cmake ctest/cmake/detect-libz.cmake ctest/cmake/detect-lz4.cmake ctest/cmake/detect-lzma.cmake ctest/cmake/detect-netcdf.cmake ctest/cmake/detect-openssl.cmake ctest/cmake/detect-pcre.cmake ctest/cmake/detect-proj.cmake ctest/cmake/detect-pthreadh.cmake ctest/cmake/detect-pthreadinit.cmake ctest/cmake/detect-pthreadkill.cmake ctest/cmake/detect-pthreadsig.cmake ctest/cmake/detect-readline.cmake ctest/cmake/detect-snappy.cmake ctest/cmake/detect-unixgetaddrinfo.cmake ctest/cmake/detect-uuid.cmake ctest/cmake/detect-valgrind.cmake ctest/cmake/detect-wingetaddrinfo.cmake ctest/cmake/detect-xml.cmake ctest/cmake/set-cmake-vars.cmake ctest/cmake/set-dir-vars.cmake ctest/cmake/test_cmake_var.c.in ctest/cmake/test_detect_bz2.c.in ctest/cmake/test_detect_commoncrypto.c.in ctest/cmake/test_detect_curl.c.in ctest/cmake/test_detect_fits.c.in ctest/cmake/test_detect_gdal.c.in ctest/cmake/test_detect_geos.c.in ctest/cmake/test_detect_getaddrinfo.c.in ctest/cmake/test_detect_iconv.c.in ctest/cmake/test_detect_libpy3.c.in ctest/cmake/test_detect_libr.c.in ctest/cmake/test_detect_libz.c.in ctest/cmake/test_detect_lz4.c.in ctest/cmake/test_detect_lzma.c.in ctest/cmake/test_detect_netcdf.c.in ctest/cmake/test_detect_openssl.c.in ctest/cmake/test_detect_pcre.c.in ctest/cmake/test_detect_proj.c.in ctest/cmake/test_detect_pthreadh.c.in ctest/cmake/test_detect_pthreadinit.c.in ctest/cmake/test_detect_pthreadkill.c.in ctest/cmake/test_detect_pthreadsig.c.in ctest/cmake/test_detect_readline.c.in ctest/cmake/test_detect_snappy.c.in ctest/cmake/test_detect_unixgetaddrinfo.c.in ctest/cmake/test_detect_uuid.c.in ctest/cmake/test_detect_valgrind.c.in ctest/cmake/test_detect_wingetaddrinfo.c.in ctest/cmake/test_detect_xml.c.in ctest/monetdb5/CMakeLists.txt ctest/monetdb5/mal/CMakeLists.txt ctest/monetdb5/mal/test_malEmbeddedBoot.c ctest/monetdb5/mal/test_malInclude.c ctest/tools/CMakeLists.txt ctest/tools/embedded/CMakeLists.txt ctest/tools/embedded/backup.c ctest/tools/embedded/example1.c ctest/tools/embedded/example2.c ctest/tools/embedded/example_append.c ctest/tools/embedded/example_blob.c ctest/tools/embedded/example_decimals.c ctest/tools/embedded/example_temporal.c ctest/tools/embedded/mapi.c ctest/tools/embedded/mapi.h gdk/CMakeLists.txt geom/CMakeLists.txt geom/lib/CMakeLists.txt geom/monetdb5/CMakeLists.txt geom/monetdb5/geom_funcs.mal geom/sql/CMakeLists.txt monetdb5/CMakeLists.txt monetdb5/extras/CMakeLists.txt monetdb5/extras/mal_optimizer_template/CMakeLists.txt monetdb5/extras/rapi/CMakeLists.txt monetdb5/mal/CMakeLists.txt monetdb5/mal/mal_embedded.c monetdb5/mal/mal_embedded.h monetdb5/mal/mal_prelude.c monetdb5/mal/mal_prelude.h monetdb5/mal/mel.h monetdb5/modules/CMakeLists.txt monetdb5/modules/atoms/CMakeLists.txt monetdb5/modules/atoms/uuid.h monetdb5/modules/kernel/CMakeLists.txt monetdb5/modules/mal/CMakeLists.txt monetdb5/modules/mal/batcalc.h monetdb5/modules/mal/calc.h monetdb5/optimizer/CMakeLists.txt monetdb5/scheduler/CMakeLists.txt monetdb5/tools/CMakeLists.txt monetdb_config.h.in monetdb_config_win32.h.in sql/CMakeLists.txt sql/backends/CMakeLists.txt sql/backends/monet5/CMakeLists.txt sql/backends/monet5/UDF/CMakeLists.txt sql/backends/monet5/UDF/capi/CMakeLists.txt sql/backends/monet5/UDF/capi/cheader.text.h sql/backends/monet5/UDF/pyapi3/CMakeLists.txt sql/backends/monet5/UDF/udf/CMakeLists.txt sql/backends/monet5/generator/CMakeLists.txt sql/backends/monet5/sql_import.h sql/backends/monet5/vaults/CMakeLists.txt sql/backends/monet5/vaults/fits/CMakeLists.txt sql/backends/monet5/vaults/lidar/CMakeLists.txt sql/backends/monet5/vaults/netcdf/CMakeLists.txt sql/backends/monet5/vaults/shp/CMakeLists.txt sql/common/CMakeLists.txt sql/include/CMakeLists.txt sql/scripts/CMakeLists.txt sql/server/CMakeLists.txt sql/storage/CMakeLists.txt sql/storage/bat/CMakeLists.txt sql/test/Tests/hot_snapshot_lz4_lite.py sql/test/Tests/hot_snapshot_lz4_lite.stable.err sql/test/Tests/hot_snapshot_lz4_lite.stable.out sql/test/out2in/Tests/All sql/test/out2in/Tests/out2in.sql sql/test/out2in/Tests/out2in.stable.err sql/test/out2in/Tests/out2in.stable.out testing/CMakeLists.txt testing/monetdb_mtest.bat.in testing/monetdb_mtest.sh.in tools/CMakeLists.txt tools/embedded/CMakeLists.txt tools/embedded/monetdb_embedded.c tools/embedded/monetdb_embedded.h tools/merovingian/CMakeLists.txt tools/merovingian/client/CMakeLists.txt tools/merovingian/daemon/CMakeLists.txt tools/merovingian/daemon/config/CMakeLists.txt tools/merovingian/utils/CMakeLists.txt tools/mserver/CMakeLists.txt unistd.h.in Removed Files: Makefile.ag bootstrap buildtools/Makefile.ag buildtools/conf/Makefile.ag clients/Makefile.ag clients/NT/Makefile.ag clients/examples/C/Makefile.ag clients/examples/Makefile.ag clients/examples/perl/Makefile.ag clients/examples/php/Makefile.ag clients/mapiclient/Makefile.ag clients/mapilib/Makefile.ag clients/odbc/Makefile.ag clients/odbc/driver/Makefile.ag clients/odbc/samples/Makefile.ag clients/odbc/setup/Makefile.ag clients/odbc/winsetup/Makefile.ag common/Makefile.ag common/options/Makefile.ag common/stream/Makefile.ag common/utils/Makefile.ag configure.ag de-bootstrap gdk/Makefile.ag geom/Makefile.ag geom/lib/Makefile.ag geom/monetdb5/Makefile.ag geom/sql/Makefile.ag libversions monetdb5/Makefile.ag monetdb5/NT/Makefile.ag monetdb5/extras/Makefile.ag monetdb5/extras/mal_optimizer_template/Makefile.ag monetdb5/extras/rapi/Makefile.ag monetdb5/mal/Makefile.ag monetdb5/modules/Makefile.ag monetdb5/modules/atoms/Makefile.ag monetdb5/modules/kernel/Makefile.ag monetdb5/modules/mal/Makefile.ag monetdb5/optimizer/Makefile.ag monetdb5/scheduler/Makefile.ag monetdb5/tools/Makefile.ag sql/Makefile.ag sql/NT/Makefile.ag sql/backends/Makefile.ag sql/backends/monet5/Makefile.ag sql/backends/monet5/UDF/Makefile.ag sql/backends/monet5/UDF/capi/Makefile.ag sql/backends/monet5/UDF/pyapi3/Makefile.ag sql/backends/monet5/UDF/udf/Makefile.ag sql/backends/monet5/generator/Makefile.ag sql/backends/monet5/sql_inspect.mal sql/backends/monet5/vaults/Makefile.ag sql/backends/monet5/vaults/fits/Makefile.ag sql/backends/monet5/vaults/lidar/Makefile.ag sql/backends/monet5/vaults/netcdf/Makefile.ag sql/backends/monet5/vaults/shp/Makefile.ag sql/common/Makefile.ag sql/include/Makefile.ag sql/scripts/Makefile.ag sql/server/Makefile.ag sql/storage/Makefile.ag sql/storage/bat/Makefile.ag testing/Makefile.ag tools/Makefile.ag tools/merovingian/Makefile.ag tools/merovingian/client/Makefile.ag tools/merovingian/daemon/Makefile.ag tools/merovingian/daemon/config/Makefile.ag tools/merovingian/utils/Makefile.ag tools/mserver/Makefile.ag Modified Files: README-Debian README-Fedora clients/Tests/All clients/Tests/exports.stable.out clients/mapilib/mapi.c clients/mapilib/monetdb-mapi.pc.in common/stream/monetdb-stream.pc.in common/stream/stream.c common/stream/stream.h common/utils/matomic.h common/utils/mcrypt.c common/utils/mcrypt.h gdk/gdk.h gdk/gdk_utils.c gdk/gdk_utils.h gdk/monetdb-gdk.pc.in geom/monetdb5/geom.c geom/monetdb5/geom.h geom/monetdb5/geom.mal geom/sql/40_geom.sql monetdb5/extras/mal_optimizer_template/opt_sql_append.c monetdb5/extras/rapi/rapi.c monetdb5/extras/rapi/rapi.mal monetdb5/mal/Tests/tst163.stable.err monetdb5/mal/Tests/tst201.malC monetdb5/mal/Tests/tst275.stable.out monetdb5/mal/Tests/tst804.stable.err monetdb5/mal/mal.c monetdb5/mal/mal.h monetdb5/mal/mal_authorize.c monetdb5/mal/mal_client.c monetdb5/mal/mal_debugger.c monetdb5/mal/mal_debugger.h monetdb5/mal/mal_import.c monetdb5/mal/mal_import.h monetdb5/mal/mal_instruction.c monetdb5/mal/mal_linker.c monetdb5/mal/mal_linker.h monetdb5/mal/mal_listing.c monetdb5/mal/mal_module.c monetdb5/mal/mal_module.h monetdb5/mal/mal_parser.c monetdb5/mal/mal_parser.h monetdb5/mal/mal_runtime.c monetdb5/mal/mal_scenario.c monetdb5/mal/mal_session.c monetdb5/mal/mal_session.h monetdb5/modules/atoms/batxml.c monetdb5/modules/atoms/blob.c monetdb5/modules/atoms/blob.mal monetdb5/modules/atoms/color.c monetdb5/modules/atoms/identifier.c monetdb5/modules/atoms/identifier.mal monetdb5/modules/atoms/inet.c monetdb5/modules/atoms/json.c monetdb5/modules/atoms/json.mal monetdb5/modules/atoms/mtime.c monetdb5/modules/atoms/str.c monetdb5/modules/atoms/str.mal monetdb5/modules/atoms/streams.c monetdb5/modules/atoms/url.c monetdb5/modules/atoms/uuid.c monetdb5/modules/atoms/uuid.mal monetdb5/modules/atoms/xml.c monetdb5/modules/atoms/xml.mal monetdb5/modules/kernel/aggr.c monetdb5/modules/kernel/alarm.c monetdb5/modules/kernel/algebra.c monetdb5/modules/kernel/algebra.mal monetdb5/modules/kernel/bat5.c monetdb5/modules/kernel/batcolor.c monetdb5/modules/kernel/batmmath.c monetdb5/modules/kernel/batstr.c monetdb5/modules/kernel/group.c monetdb5/modules/kernel/microbenchmark.c monetdb5/modules/kernel/mmath.c monetdb5/modules/kernel/mmath.mal monetdb5/modules/kernel/status.c monetdb5/modules/mal/01_batcalc.mal.sh monetdb5/modules/mal/Tests/inspect05.malC monetdb5/modules/mal/Tests/inspect05.stable.out.int128 monetdb5/modules/mal/batExtensions.c monetdb5/modules/mal/batExtensions.mal monetdb5/modules/mal/batcalc.c monetdb5/modules/mal/bbp.c monetdb5/modules/mal/calc.c monetdb5/modules/mal/clients.c monetdb5/modules/mal/factories.c monetdb5/modules/mal/groupby.c monetdb5/modules/mal/inspect.c monetdb5/modules/mal/inspect.h monetdb5/modules/mal/inspect.mal monetdb5/modules/mal/iterator.c monetdb5/modules/mal/json_util.c monetdb5/modules/mal/language.c monetdb5/modules/mal/mal_io.c monetdb5/modules/mal/mal_mapi.c monetdb5/modules/mal/mal_mapi.mal monetdb5/modules/mal/manifold.c monetdb5/modules/mal/manual.c monetdb5/modules/mal/mat.c monetdb5/modules/mal/mdb.c monetdb5/modules/mal/mkey.c monetdb5/modules/mal/oltp.c monetdb5/modules/mal/orderidx.c monetdb5/modules/mal/orderidx.mal monetdb5/modules/mal/pcre.c monetdb5/modules/mal/pcre.mal monetdb5/modules/mal/profiler.c monetdb5/modules/mal/projectionpath.c monetdb5/modules/mal/querylog.c monetdb5/modules/mal/remote.c monetdb5/modules/mal/remote.mal monetdb5/modules/mal/sample.c monetdb5/modules/mal/sysmon.c monetdb5/modules/mal/tokenizer.c monetdb5/modules/mal/tracer.c monetdb5/modules/mal/transaction.c monetdb5/modules/mal/txtsim.c monetdb5/modules/mal/wlc.c monetdb5/optimizer/opt_pipes.c monetdb5/optimizer/opt_support.c monetdb5/optimizer/opt_wrapper.c monetdb5/optimizer/optimizer.c monetdb5/optimizer/optimizer.mal monetdb5/optimizer/optimizer_private.h monetdb5/tools/monetdb5.pc.in sql/backends/monet5/UDF/capi/capi.c sql/backends/monet5/UDF/capi/capi.mal sql/backends/monet5/UDF/pyapi3/conversion3.c sql/backends/monet5/UDF/pyapi3/convert_loops.h sql/backends/monet5/UDF/pyapi3/pyapi3.c sql/backends/monet5/UDF/pyapi3/pyapi3.mal sql/backends/monet5/UDF/pyapi3/pyheader.h sql/backends/monet5/UDF/udf/udf.c sql/backends/monet5/generator/generator.c sql/backends/monet5/rel_bin.c sql/backends/monet5/sql.c sql/backends/monet5/sql.mal sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_hge.mal sql/backends/monet5/sql_result.c sql/backends/monet5/sql_scenario.c sql/backends/monet5/sql_statement.c sql/backends/monet5/sql_subquery.c sql/backends/monet5/sql_subquery.mal sql/backends/monet5/sql_upgrades.c sql/backends/monet5/vaults/fits/fits.c sql/backends/monet5/vaults/netcdf/netcdf.c sql/backends/monet5/vaults/shp/shp.c sql/backends/monet5/vaults/shp/shp.h sql/backends/monet5/wlr.c sql/common/sql_types.c sql/common/sql_types.h sql/include/sql_list.h sql/include/sql_mem.h sql/scripts/26_sysmon.sql sql/server/rel_exp.c sql/server/rel_exp.h sql/server/rel_optimizer.c sql/server/rel_out2inner_join.txt sql/server/rel_planner.c sql/server/rel_rel.h sql/server/rel_updates.h sql/server/sql_env.c sql/server/sql_mvc.h sql/server/sql_scan.h sql/server/sql_semantic.h sql/storage/bat/bat_logger.c sql/storage/sql_storage.h sql/test/BugTracker-2013/Tests/All sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.stable.out sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.stable.out.single sql/test/Tests/50ways.stable.out sql/test/Tests/All sql/test/Tests/hot_snapshot.py sql/test/Tests/keys.stable.out sql/test/emptydb-upgrade-chain-hge/Tests/All sql/test/emptydb-upgrade-chain/Tests/All sql/test/emptydb-upgrade-hge/Tests/All sql/test/emptydb-upgrade/Tests/All sql/test/emptydb/Tests/All sql/test/osm/Tests/drop_constraint_bug.stable.out sql/test/subquery/Tests/correlated.stable.out sql/test/subquery/Tests/subquery5.stable.out sql/test/sys-schema/Tests/systemfunctions.stable.out sql/test/sys-schema/Tests/systemfunctions.stable.out.int128 testing/Mtest.py.in tools/merovingian/daemon/controlrunner.c tools/mserver/mserver5.c tools/mserver/shutdowntest.c Branch: unlock Log Message:
merged diffs (truncated from 35587 to 300 lines): diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,184 @@ +#[[ +# 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 - 2020 MonetDB B.V. +#]] + +cmake_minimum_required(VERSION 3.12) + +set(CMAKE_MODULE_PATH + "${CMAKE_SOURCE_DIR}/cmake" + "${CMAKE_SOURCE_DIR}/cmake/Modules" + CACHE + INTERNAL + "Location of custom CMake modules.") + +include(CMakeDependentOption REQUIRED) + +include(monetdb-options) +include(monetdb-versions) +project(MonetDB VERSION "${MONETDB_VERSION}" LANGUAGES C) +set(CMAKE_PROJECT_HOMEPAGE_URL "https://www.monetdb.org/") +set(C_STANDARD_REQUIRED ON) +set(CMAKE_C_STANDARD 99) + +if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0") + cmake_policy(SET CMP0076 OLD) +endif() + +# We give precedence to UNIX include directories over +# OS X Frameworks directories +set(CMAKE_FIND_FRAMEWORK LAST) +set(CMAKE_FIND_APPBUNDLE LAST) + +include(CheckCSourceCompiles REQUIRED) +include(CheckIncludeFile REQUIRED) +include(CMakePushCheckState REQUIRED) +include(CheckStructHasMember REQUIRED) +include(CheckSymbolExists REQUIRED) +include(CheckFunctionExists REQUIRED) +include(CheckTypeSize REQUIRED) +include(TestBigEndian REQUIRED) + +if(WIN32) + set(CMAKE_REQUIRED_LIBRARIES ws2_32.lib shell32.lib advapi32.lib) +endif() + +# Include MonetDB specific functions +include(monetdb-functions) +include(monetdb-findpackages) +include(monetdb-toolchain) +monetdb_default_toolchain() + +include(monetdb-defines) +monetdb_hg_revision() + +# required for symbol existance tests +if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + add_definitions(-D_XOPEN_SOURCE -D_GNU_SOURCE) + set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE") +endif() + +monetdb_configure_defines() + +if(HAVE_NETDB_H) + set(CMAKE_EXTRA_INCLUDE_FILES "netdb.h" "unistd.h") +endif() +if(HAVE_WINSOCK_H) + set(CMAKE_EXTRA_INCLUDE_FILES "winsock.h") +endif() +set(CMAKE_REQUIRED_INCLUDES "/usr/include") + +monetdb_configure_crypto() +monetdb_configure_sizes() + +include(GNUInstallDirs) + +# Define the macro variables after configuring the install directories. +# Some variables define additional installation settings. +monetdb_macro_variables() +monetdb_configure_misc() +# Define custom target after the install directories variables. +# Some custom target will need these setting. +include(monetdb-custom-targets) + +SET(CMAKE_SKIP_BUILD_RPATH FALSE) +SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) +SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}") +SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + +# required for some instalation files +set(PROGRAM_PERMISSIONS_DEFAULT + OWNER_WRITE + OWNER_READ + OWNER_EXECUTE + GROUP_READ + GROUP_EXECUTE + WORLD_READ + WORLD_EXECUTE) + +find_program(BASH NAMES bash DOC "bash interpreter fullpath") + +if(WIN32) + configure_file(monetdb_config_win32.h.in + ${CMAKE_CURRENT_BINARY_DIR}/monetdb_config.h) + configure_file(unistd.h.in + ${CMAKE_CURRENT_BINARY_DIR}/unistd.h) +else() + configure_file(monetdb_config.h.in + ${CMAKE_CURRENT_BINARY_DIR}/monetdb_config.h) +endif() + +add_library(monetdb_config_header + INTERFACE) + +target_include_directories(monetdb_config_header + INTERFACE + $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/monetdb>) + +install(TARGETS + monetdb_config_header + EXPORT monetdb_config_headerTargets + COMPONENT monetdbdev) + +install(EXPORT monetdb_config_headerTargets + FILE monetdb_config_headerTargets.cmake + NAMESPACE MonetDB:: + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cmake + COMPONENT monetdbdev) + +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/monetdb_config.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monetdb + COMPONENT monetdbdev) + +# [TODO]: install created python file +configure_file(create_include_object.py.in + ${CMAKE_CURRENT_BINARY_DIR}/create_include_object.py + @ONLY) + +if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-undefined,dynamic_lookup -Wl,-undefined,dynamic_lookup") +endif() + +add_subdirectory(common) +add_subdirectory(clients) +add_subdirectory(gdk) +add_subdirectory(monetdb5) +add_subdirectory(sql) +add_subdirectory(geom) +add_subdirectory(tools) +if(TESTING) + add_subdirectory(testing) +endif() + +include(CMakePackageConfigHelpers) +configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in + "${CMAKE_CURRENT_BINARY_DIR}/MonetDBConfig.cmake" + INSTALL_DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/cmake)" + NO_SET_AND_CHECK_MACRO + NO_CHECK_REQUIRED_COMPONENTS_MACRO) + +write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/MonetDBConfigVersion.cmake" + VERSION "${MONETDB_VERSION}" + COMPATIBILITY AnyNewerVersion) + +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/MonetDBConfig.cmake + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cmake + COMPONENT monetdbdev) + +include(monetdb-packages) + +include(CTest) +add_subdirectory(ctest) + +if(CMAKE_SUMMARY) + monetdb_cmake_summary() +endif() + +# vim: set ts=2:sw=2:et diff --git a/Config.cmake.in b/Config.cmake.in new file mode 100644 --- /dev/null +++ b/Config.cmake.in @@ -0,0 +1,16 @@ +#[[ +# 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 - 2020 MonetDB B.V. +#]] + +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/monetdb_config_headerTargets.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/streamTargets.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/mapiTargets.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/matomicTargets.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/gdkTargets.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/monetdb5Targets.cmake") diff --git a/Makefile.ag b/Makefile.ag deleted file mode 100644 --- a/Makefile.ag +++ /dev/null @@ -1,25 +0,0 @@ -# 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 - 2020 MonetDB B.V. - -SUBDIRS = buildtools common clients \ - gdk \ - monetdb5 \ - sql \ - HAVE_GEOM?geom \ - tools \ - HAVE_TESTING?testing \ - -EXTRA_DIST = bootstrap configure configure.ac configure.ag libversions \ - MonetDB.spec rpm.mk.in COPYING README.rst license.txt HowToStart.rst \ - README-Fedora README-Debian - -EXTRA_DIST_DIR = NT debian MacOSX documentation - -headers_config = { - DIR = includedir/monetdb - HEADERS = h - SOURCES = monetdb_config.h -} diff --git a/README-Debian b/README-Debian --- a/README-Debian +++ b/README-Debian @@ -2,16 +2,12 @@ The following packages (DEBs) are or can These packages are required. -automake +cmake # version >= 3.12 bison gettext libssl-dev -libtool libxml2-dev -m4 -make mercurial -pkg-config These packages are optional, but required when building the MonetDB .deb packages. diff --git a/README-Fedora b/README-Fedora --- a/README-Fedora +++ b/README-Fedora @@ -2,14 +2,12 @@ The following packages (RPMs) are or can These packages are required. +cmake # version >= 3.12 bison gettext-devel -libtool libxml2-devel mercurial openssl-devel -pkgconf-m4 -pkgconf-pkg-config These packages are optional, but they are required to build RPMs using the command make rpm. diff --git a/README.md b/README.md new file mode 100644 --- /dev/null +++ b/README.md @@ -0,0 +1,67 @@ +# Building MonetDB from source + +## Summary + +For cmake, you should always build the code in a separate directory, say "build". This directory should be OUTSIDE of the source code tree. The results of the build are stored in this directory. The location on the filesystem is not important, as long as you have permissions to write in that location. + +Assuming the monetdb source code is checked out in directory "/path/to/monetdb/source". And if you have all the required packages (See below) to build MonetDB, these are the set of commands to build and *install* it from source. Install is one of the predefined targets [install, test, mtest]. When you test monetdb, you will likely not want to install it in the default location, the standard GNU directory structure. So you want to set the install prefix variable when generating the build system, using -DCMAKE_INSTALL_PREFIX + +``` +mkdir build +cd build +cmake -DCMAKE_INSTALL_PREFIX=/path/to/install/monetdb /path/to/monetdb/source +cmake --build . +cmake --build . --target install +``` _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list