Changeset: a6e9f97a989b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a6e9f97a989b Branch: mtest Log Message:
Merge with default branch. diffs (102 lines): diff --git a/clients/odbc/driver/CMakeLists.txt b/clients/odbc/driver/CMakeLists.txt --- a/clients/odbc/driver/CMakeLists.txt +++ b/clients/odbc/driver/CMakeLists.txt @@ -6,6 +6,10 @@ # Copyright 1997 - July 2008 CWI, August 2008 - 2020 MonetDB B.V. #]] +if (${HAVE_ODBCINST}) + add_compile_definitions(HAVE_SQLGETPRIVATEPROFILESTRING) +endif() + add_library(MonetODBC MODULE) @@ -109,6 +113,7 @@ target_include_directories(MonetODBC PRIVATE $<TARGET_PROPERTY:mapi,INTERFACE_INCLUDE_DIRECTORIES> $<$<BOOL:${ODBC_FOUND}>:${ODBC_INCLUDE_DIRS}> + $<$<BOOL:${ODBCinst_FOUND}>:${ODBCINST_INCLUDE_DIRS}> PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/monetdb>) @@ -121,7 +126,8 @@ target_link_libraries(MonetODBC PRIVATE monetdb_config_header mutils - mapi) + mapi + ${ODBCINST_LIBRARIES}) install(TARGETS MonetODBC diff --git a/cmake/Modules/FindODBCinst.cmake b/cmake/Modules/FindODBCinst.cmake new file mode 100644 --- /dev/null +++ b/cmake/Modules/FindODBCinst.cmake @@ -0,0 +1,38 @@ +#[[ +# 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. +#]] + +include(FindPackageHandleStandardArgs) + +if(WIN32) + set(ODBCINST_INCLUDE_DIR "") + set(ODBCINST_LIBRARIES odbccp32.lib legacy_stdio_definitions.lib) + + # ODBCINST_INCLUDE_DIR is empty, so don't require it + find_package_handle_standard_args(ODBCinst DEFAULT_MSG + ODBCINST_LIBRARIES) +else() + find_package(PkgConfig QUIET) + pkg_check_modules(PC_ODBCINST QUIET odbcinst) + + find_path(ODBCINST_INCLUDE_DIR NAMES odbcinst.h + HINTS + ${PC_ODBCINST_INCLUDEDIR} + ${PC_ODBCINST_INCLUDE_DIRS} + ) + + find_library(ODBCINST_LIBRARIES NAMES odbcinst + HINTS + ${PC_ODBCINST_LIBDIR} + ${PC_ODBCINST_LIBRARY_DIRS} + ) + + find_package_handle_standard_args(ODBCinst DEFAULT_MSG + ODBCINST_LIBRARIES ODBCINST_INCLUDE_DIR) +endif() + +mark_as_advanced(ODBCINST_INCLUDE_DIR ODBCINST_LIBRARIES) diff --git a/cmake/monetdb-defines.cmake b/cmake/monetdb-defines.cmake --- a/cmake/monetdb-defines.cmake +++ b/cmake/monetdb-defines.cmake @@ -146,6 +146,7 @@ macro(monetdb_macro_variables) set(HAVE_VALGRIND ${VALGRIND_FOUND}) set(HAVE_NETCDF ${NETCDF_FOUND}) set(HAVE_READLINE ${READLINE_FOUND}) + set(HAVE_ODBCINST ${ODBCinst_FOUND}) set(HAVE_LIBR ${LIBR_FOUND}) set(RHOME "${LIBR_HOME}") set(HAVE_GEOM ${GEOS_FOUND}) diff --git a/cmake/monetdb-findpackages.cmake b/cmake/monetdb-findpackages.cmake --- a/cmake/monetdb-findpackages.cmake +++ b/cmake/monetdb-findpackages.cmake @@ -102,6 +102,7 @@ endif() if(ODBC) find_package(ODBC) + find_package(ODBCinst) endif() if(RINTEGRATION) diff --git a/monetdb5/optimizer/Tests/SingleServer b/monetdb5/optimizer/Tests/SingleServer --- a/monetdb5/optimizer/Tests/SingleServer +++ b/monetdb5/optimizer/Tests/SingleServer @@ -1,1 +0,0 @@ - _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list