alinaliBQ commented on code in PR #40939:
URL: https://github.com/apache/arrow/pull/40939#discussion_r2023608952


##########
cpp/src/arrow/flight/sql/odbc/flight_sql/CMakeLists.txt:
##########
@@ -0,0 +1,209 @@
+# 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.
+
+cmake_minimum_required(VERSION 3.16)
+set(CMAKE_CXX_STANDARD 17)
+
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
+include_directories(include include/flight_sql
+                    ${CMAKE_SOURCE_DIR}/odbcabstraction/include)
+
+if(DEFINED CMAKE_TOOLCHAIN_FILE)
+  include(${CMAKE_TOOLCHAIN_FILE})
+endif()
+
+# Add Zlib dependencies needed by Arrow Flight. Should be pre-installed
+# unless provided by VCPKG. find_package(ZLIB REQUIRED)
+
+# Add Protobuf dependencies needed by Arrow Flight. Should be pre-installed.
+# set(Protobuf_USE_STATIC_LIBS OFF) find_package(Protobuf REQUIRED)
+
+# Add OpenSSL dependencies needed by Arrow Flight. Should be pre-installed. #
+# May need to set OPENSSL_ROOT_DIR first. On Mac if using brew: # brew install
+# openssl@1.1 # add to the cmake line
+# -DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl@1.1/1.1.1m if (NOT DEFINED
+# OPENSSL_ROOT_DIR AND DEFINED APPLE AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
+# set(OPENSSL_ROOT_DIR /usr/local/Cellar/openssl@1.1/1.1.1m) endif() # This is
+# based on Arrow's FindOpenSSL module. It's not clear if both variables # need
+# to be set. if (NOT DEFINED MSVC) set(OpenSSL_USE_STATIC_LIBS ON)
+# set(OPENSSL_USE_STATIC_LIBS ON) endif() find_package(OpenSSL REQUIRED)
+
+# OpenSSL depends on krb5 on CentOS if (UNIX) list(APPEND OPENSSL_LIBRARIES 
krb5
+# k5crypto) endif()
+
+# Add gRPC dependencies needed by Arrow Flight. Should be pre-installed.
+# find_package(gRPC 1.36 CONFIG REQUIRED)
+
+find_package(RapidJSON CONFIG REQUIRED)
+
+if(MSVC)
+  # the following definitions stop arrow from using __declspec when staticly
+  # linking and will break on Windows without them
+  add_compile_definitions(ARROW_STATIC ARROW_FLIGHT_STATIC)
+endif()
+
+enable_testing()
+
+add_library(arrow_odbc_spi_impl
+            include/flight_sql/flight_sql_driver.h
+            accessors/binary_array_accessor.cc
+            accessors/binary_array_accessor.h
+            accessors/boolean_array_accessor.cc
+            accessors/boolean_array_accessor.h
+            accessors/common.h
+            accessors/date_array_accessor.cc
+            accessors/date_array_accessor.h
+            accessors/decimal_array_accessor.cc
+            accessors/decimal_array_accessor.h
+            accessors/main.h
+            accessors/primitive_array_accessor.cc
+            accessors/primitive_array_accessor.h
+            accessors/string_array_accessor.cc
+            accessors/string_array_accessor.h
+            accessors/time_array_accessor.cc
+            accessors/time_array_accessor.h
+            accessors/timestamp_array_accessor.cc
+            accessors/timestamp_array_accessor.h
+            address_info.cc
+            address_info.h
+            flight_sql_auth_method.cc
+            flight_sql_auth_method.h
+            flight_sql_connection.cc
+            flight_sql_connection.h
+            flight_sql_driver.cc
+            flight_sql_get_tables_reader.cc
+            flight_sql_get_tables_reader.h
+            flight_sql_get_type_info_reader.cc
+            flight_sql_get_type_info_reader.h
+            flight_sql_result_set.cc
+            flight_sql_result_set.h
+            flight_sql_result_set_accessors.cc
+            flight_sql_result_set_accessors.h
+            flight_sql_result_set_column.cc
+            flight_sql_result_set_column.h
+            flight_sql_result_set_metadata.cc
+            flight_sql_result_set_metadata.h
+            flight_sql_ssl_config.cc
+            flight_sql_ssl_config.h
+            flight_sql_statement.cc
+            flight_sql_statement.h
+            flight_sql_statement_get_columns.cc
+            flight_sql_statement_get_columns.h
+            flight_sql_statement_get_tables.cc
+            flight_sql_statement_get_tables.h
+            flight_sql_statement_get_type_info.cc
+            flight_sql_statement_get_type_info.h
+            flight_sql_stream_chunk_buffer.cc
+            flight_sql_stream_chunk_buffer.h
+            get_info_cache.cc
+            get_info_cache.h
+            json_converter.cc
+            json_converter.h
+            record_batch_transformer.cc
+            record_batch_transformer.h
+            scalar_function_reporter.cc
+            scalar_function_reporter.h
+            system_trust_store.cc
+            system_trust_store.h
+            utils.cc)
+target_include_directories(arrow_odbc_spi_impl PUBLIC 
${CMAKE_CURRENT_LIST_DIR})
+if(WIN32)
+  target_sources(arrow_odbc_spi_impl

Review Comment:
   ```suggestion
     target_sources(arrow_odbc_spi_impl PRIVATE
   ```
   According to cmake docs, 
[`target_sources`](https://cmake.org/cmake/help/latest/command/target_sources.html)
 need a `INTERFACE`, `PUBLIC` or `PRIVATE` keyword to be able to build. I feel 
`PRIVATE` might be suitable here



-- 
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.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to