2021-12-30 12:05:26 +00:00
|
|
|
# Licensed to the LF AI & Data foundation 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
|
2021-04-19 03:32:24 +00:00
|
|
|
# with the License. You may obtain a copy of the License at
|
|
|
|
#
|
2021-12-30 12:05:26 +00:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2021-04-19 03:32:24 +00:00
|
|
|
#
|
2021-12-30 12:05:26 +00:00
|
|
|
# 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.
|
2021-04-19 03:32:24 +00:00
|
|
|
|
2021-09-28 06:00:03 +00:00
|
|
|
cmake_minimum_required( VERSION 3.18 )
|
2020-12-07 07:22:20 +00:00
|
|
|
project(wrapper)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
|
2022-03-01 02:31:55 +00:00
|
|
|
include( GNUInstallDirs )
|
2020-12-08 10:51:07 +00:00
|
|
|
include( ExternalProject )
|
2022-05-22 12:03:58 +00:00
|
|
|
include( CheckCXXCompilerFlag )
|
2020-12-07 07:22:20 +00:00
|
|
|
|
2022-05-22 12:03:58 +00:00
|
|
|
set(ARROW_OUTPUT_PREFIX ${CMAKE_INSTALL_PREFIX}/../../../core/output)
|
2020-12-07 07:22:20 +00:00
|
|
|
add_library(wrapper STATIC)
|
2021-12-08 12:55:05 +00:00
|
|
|
target_sources(wrapper PUBLIC ParquetWrapper.cpp PayloadStream.cpp)
|
2022-04-14 11:57:34 +00:00
|
|
|
|
2022-05-22 12:03:58 +00:00
|
|
|
if ( NOT MSYS )
|
|
|
|
add_library(parquet STATIC IMPORTED)
|
|
|
|
set_target_properties(parquet PROPERTIES
|
|
|
|
IMPORTED_LOCATION "${ARROW_OUTPUT_PREFIX}/lib/libparquet.a"
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${ARROW_OUTPUT_PREFIX}/include")
|
|
|
|
endif()
|
|
|
|
|
2022-04-14 11:57:34 +00:00
|
|
|
if ( EMBEDDED_MILVUS )
|
|
|
|
message ( STATUS "Turning on fPIC while building embedded Milvus" )
|
|
|
|
set_target_properties( wrapper PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR} POSITION_INDEPENDENT_CODE ON )
|
|
|
|
else()
|
|
|
|
set_target_properties( wrapper PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR} )
|
|
|
|
endif()
|
|
|
|
|
2021-12-08 12:55:05 +00:00
|
|
|
target_link_libraries( wrapper PUBLIC parquet pthread)
|
2020-12-07 07:22:20 +00:00
|
|
|
|
|
|
|
if(NOT CMAKE_INSTALL_PREFIX)
|
|
|
|
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
endif()
|
2020-12-08 10:51:07 +00:00
|
|
|
|
2021-12-08 12:55:05 +00:00
|
|
|
install( TARGETS wrapper )
|
2020-12-07 07:22:20 +00:00
|
|
|
|
2021-03-11 10:42:25 +00:00
|
|
|
if (BUILD_TESTING)
|
|
|
|
add_subdirectory(test)
|
|
|
|
endif()
|