From issues-return-89285-archive-asf-public=cust-asf.ponee.io@nifi.apache.org Wed Dec 18 08:35:28 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 12B8318065B for ; Wed, 18 Dec 2019 09:35:27 +0100 (CET) Received: (qmail 52087 invoked by uid 500); 18 Dec 2019 08:35:27 -0000 Mailing-List: contact issues-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list issues@nifi.apache.org Received: (qmail 52078 invoked by uid 99); 18 Dec 2019 08:35:27 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Dec 2019 08:35:27 +0000 From: GitBox To: issues@nifi.apache.org Subject: [GitHub] [nifi-minifi-cpp] am-c-p-p commented on a change in pull request #656: MINIFI-1013 Used soci library. Message-ID: <157665812730.1187.55900653404405838.gitbox@gitbox.apache.org> Date: Wed, 18 Dec 2019 08:35:27 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit am-c-p-p commented on a change in pull request #656: MINIFI-1013 Used soci library. URL: https://github.com/apache/nifi-minifi-cpp/pull/656#discussion_r359213202 ########## File path: extensions/sql/CMakeLists.txt ########## @@ -0,0 +1,148 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt) +include_directories(../../thirdparty/rapidjson-1.1.0/include/ ../../thirdparty/rapidjson-1.1.0/include/rapidjson) +set(EXTRA_SOURCES "") +if (WIN32) +# set(EXTRA_SOURCES "win/*.cpp") +endif() + +file(GLOB SOURCES "*.cpp" "services/*.cpp" "processors/*.cpp" "data/*.cpp" ${EXTRA_SOURCES} ) + +add_library(minifi-sql STATIC ${SOURCES}) +set_property(TARGET minifi-sql PROPERTY POSITION_INDEPENDENT_CODE ON) +if(THREADS_HAVE_PTHREAD_ARG) + target_compile_options(PUBLIC minifi-sql "-pthread") +endif() +if(CMAKE_THREAD_LIBS_INIT) + target_link_libraries(minifi-sql "${CMAKE_THREAD_LIBS_INIT}") +endif() + +find_package(Patch) + +if(NOT WIN32) +set(ODBC_BYPRODUCT_DIR "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/iodbc-install/" CACHE STRING "iODBC install directory") + + ExternalProject_Add( + iodbc-external + GIT_REPOSITORY "https://github.com/openlink/iODBC.git" + GIT_TAG "d9293505804e775488582321420e427464e6c3ce" + BUILD_IN_SOURCE true + SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/iodbc-src" + BUILD_COMMAND make + CMAKE_COMMAND "" + UPDATE_COMMAND "" + INSTALL_COMMAND make install + CONFIGURE_COMMAND "" + PATCH_COMMAND ./autogen.sh && ./configure --prefix=${ODBC_BYPRODUCT_DIR} + STEP_TARGETS build + EXCLUDE_FROM_ALL TRUE + BUILD_BYPRODUCTS ${ODBC_BYPRODUCT} + ) + + endif() +set(SOCI_BYPRODUCT_DIR "${CMAKE_CURRENT_BINARY_DIR}/thirdparty/soci-install" CACHE STRING "SOCI install directory") +if(WIN32) + set(BYPRODUCT "${SOCI_BYPRODUCT_DIR}/lib/libsoci_core_4_0.lib") + set(ODBC_BYPRODUCT "${SOCI_BYPRODUCT_DIR}/lib/libsoci_odbc_4_0.lib") + set(ODBC_OPTION "") + set(CMAKE_MODULE "") +else() + set(BYPRODUCT "${SOCI_BYPRODUCT_DIR}/lib64/libsoci_core.a") + set(ODBC_OPTION "-DODBC_BYPRODUCT_DIR=${ODBC_BYPRODUCT_DIR}") + set(ODBC_BYPRODUCT "${SOCI_BYPRODUCT_DIR}/lib64/libsoci_odbc.a") + set(CMAKE_MODULE "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR}/cmake/") +endif() + + + + ExternalProject_Add( + sql-external + GIT_REPOSITORY "https://github.com/SOCI/soci.git" + GIT_TAG "04e1870294918d20761736743bb6136314c42dd5" Review comment: Resolved by @bakaid ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services