Skip to content

Commit

Permalink
[c++,r] Move nanoarrow to src/external
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Apr 3, 2024
1 parent aa0adcb commit cb7524b
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 26 deletions.
2 changes: 1 addition & 1 deletion apis/r/inst/include/tiledbsoma_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define TILEDB_NO_API_DEPRECATION_WARNINGS
#endif

#include <tiledbsoma/utils/nanoarrow.h> // for C interface to Arrow
#include <tiledbsoma/nanoarrow/nanoarrow.h> // for C interface to Arrow
#include <tiledb/tiledb> // for QueryCondition etc
#define ARROW_SCHEMA_AND_ARRAY_DEFINED 1
#include <tiledbsoma/tiledbsoma>
Expand Down
8 changes: 4 additions & 4 deletions apis/r/src/rinterface.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <Rcpp.h> // for R interface to C++
#include <nanoarrow/r.h> // for C interface to Arrow (via R package)
#include <tiledbsoma/utils/nanoarrow.hpp> // for C/C++ interface to Arrow
#include <RcppInt64> // for fromInteger64
#include <Rcpp.h> // for R interface to C++
#include <nanoarrow/r.h> // for C interface to Arrow (via R package)
#include <tiledbsoma/nanoarrow/nanoarrow.hpp> // for C/C++ interface to Arrow
#include <RcppInt64> // for fromInteger64

// we currently get deprecation warnings by default which are noisy
#ifndef TILEDB_NO_API_DEPRECATION_WARNINGS
Expand Down
9 changes: 3 additions & 6 deletions apis/r/src/riterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@

//#define RCPP_DEBUG_LEVEL 5

#include <Rcpp.h> // for R interface to C++
#include <nanoarrow/r.h> // for C interface to Arrow (via R package nanoarrow)
#include <tiledbsoma/utils/nanoarrow.h>
#include <Rcpp.h> // for R interface to C++
#include <nanoarrow/r.h> // for C interface to Arrow (via R package nanoarrow)
#include <tiledbsoma/nanoarrow/nanoarrow.h>

#include <tiledb/tiledb>
#if TILEDB_VERSION_MAJOR == 2 && TILEDB_VERSION_MINOR >= 4
#include <tiledb/tiledb_experimental>
#endif

// We get these via nanoarrow and must not include carrow.h again
#define ARROW_SCHEMA_AND_ARRAY_DEFINED 1
#include <tiledbsoma/tiledbsoma>

#include "rutilities.h" // local declarations
Expand Down
9 changes: 3 additions & 6 deletions apis/r/src/rutilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
#define TILEDB_NO_API_DEPRECATION_WARNINGS
#endif

#include <Rcpp.h> // for R interface to C++
#include <tiledbsoma/utils/nanoarrow.h> // for C interface to Arrow
#include <RcppInt64> // for fromInteger64

// We get these via nanoarrow and must cannot include carrow.h again
#define ARROW_SCHEMA_AND_ARRAY_DEFINED 1
#include <Rcpp.h> // for R interface to C++
#include <tiledbsoma/nanoarrow/nanoarrow.h> // for C interface to Arrow
#include <RcppInt64> // for fromInteger64
#include <tiledbsoma/tiledbsoma>

#include "rutilities.h" // local declarations
Expand Down
2 changes: 1 addition & 1 deletion libtiledbsoma/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# The MIT License
#
# Copyright (c) 2022-2023 TileDB, Inc.
# Copyright (c) 2022-2024 TileDB, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
15 changes: 8 additions & 7 deletions libtiledbsoma/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ add_library(TILEDB_SOMA_OBJECTS OBJECT
${CMAKE_CURRENT_SOURCE_DIR}/utils/stats.cc
${CMAKE_CURRENT_SOURCE_DIR}/utils/util.cc
${CMAKE_CURRENT_SOURCE_DIR}/utils/version.cc
${CMAKE_CURRENT_SOURCE_DIR}/utils/nanoarrow.c

${CMAKE_CURRENT_SOURCE_DIR}/external/src/thread_pool/thread_pool.cc
${CMAKE_CURRENT_SOURCE_DIR}/external/src/thread_pool/status.cc
${CMAKE_CURRENT_SOURCE_DIR}/external/src/nanoarrow/nanoarrow.c
)

message(STATUS "Building TileDB without deprecation warnings")
Expand All @@ -94,6 +94,7 @@ target_include_directories(TILEDB_SOMA_OBJECTS
${CMAKE_CURRENT_SOURCE_DIR}/soma
${CMAKE_CURRENT_SOURCE_DIR}/external/khash
${CMAKE_CURRENT_SOURCE_DIR}/external/include
${CMAKE_CURRENT_SOURCE_DIR}/external/include/nanoarrow
$<TARGET_PROPERTY:TileDB::tiledb_shared,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:spdlog::spdlog,INTERFACE_INCLUDE_DIRECTORIES>
${pybind11_INCLUDE_DIRS}
Expand Down Expand Up @@ -213,12 +214,6 @@ install(FILES
DESTINATION "include/tiledbsoma/reindexer/"
)

install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/utils/nanoarrow.h
${CMAKE_CURRENT_SOURCE_DIR}/utils/nanoarrow.hpp
DESTINATION "include/tiledbsoma/utils/"
)

install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/tiledbsoma/tiledbsoma
DESTINATION "include/tiledbsoma"
Expand All @@ -239,6 +234,12 @@ install(FILES
DESTINATION "include/tiledbsoma/soma/span"
)

install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/external/include/nanoarrow/nanoarrow.h
${CMAKE_CURRENT_SOURCE_DIR}/external/include/nanoarrow/nanoarrow.hpp
DESTINATION "include/tiledbsoma/nanoarrow"
)


# ###########################################################
# API symbol exports
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion libtiledbsoma/src/utils/arrow_adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// https://arrow.apache.org/docs/format/Columnar.html#buffer-listing-for-each-layout
// https://arrow.apache.org/docs/format/CDataInterface.html#exporting-a-simple-int32-array

#include "nanoarrow.hpp"
#include "tiledbsoma/nanoarrow/nanoarrow.hpp"

namespace tiledbsoma {

Expand Down

0 comments on commit cb7524b

Please sign in to comment.