Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ project(
option(YGM_BUILD_TESTS "Build tests" OFF)
option(YGM_BUILD_DOCS "Adds targets for generating Doxygen and Sphinx documentation" OFF)
option(YGM_DOCS_ONLY "Run Cmake for only generating documentation (i.e. for Read the Docs)" OFF)
option(YGM_FIND_PARQUET_IN_SYSTEM "Find Arrow Parquet installed in the system." OFF)
option(YGM_INSTALL_PARQUET "Installs Arrow Parquet." OFF)
set(YGM_PYTHON_VENV_ROOT CACHE PATH "Path to a Python virtual environment root. If set, YGM will use this virtual environment for Python dependencies.")
option(YGM_DONT_USE_MREMAP "Do not try using mremap for managing memory." OFF)
Expand Down Expand Up @@ -129,6 +130,13 @@ endif ()
# Arrow
#
include(FindArrowParquet)
if (YGM_FIND_PARQUET_IN_SYSTEM)
if (YGM_INSTALL_PARQUET)
message(INFO "Both YGM_FIND_PARQUET_IN_SYSTEM and YGM_INSTALL_PARQUET are also ON. System-wide Arrow Parquet is used, if found.")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has the behavior in this message been tested? Looking at the find_arrow_parquet_config and install_arrow_parquet functions, it looks like setting both of these would lead to an error here when CMake tries adding the arrow_shared target that should already be found as part of the system Arrow.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested this on my laptop, and it works as advertised.

endif()
find_arrow_parquet_config()
endif ()

if (YGM_INSTALL_PARQUET)
install_arrow_parquet()
endif ()
Expand Down
6 changes: 3 additions & 3 deletions cmake/FindArrowParquet.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ endfunction()
# Arrow_FOUND is set to TRUE if Arrow is found.
# Parquet_FOUND is set to TRUE if Parquet is found.
function(find_arrow_parquet_config)
# Find Arrow >= 8.0.
# Find Arrow >= 19.0.
# Start major version from 100 so that we do not have to update
# this code every time Arrow releases a major version.
foreach (MAJOR_VERSION RANGE 100 8 -1)
foreach (MAJOR_VERSION RANGE 100 19 -1)
find_package(Arrow "${MAJOR_VERSION}.0" QUIET)
if (Arrow_FOUND)
break()
Expand All @@ -160,7 +160,7 @@ function(find_arrow_parquet_config)

# Find Parquet
if (Arrow_FOUND)
find_package(Parquet QUIET PATHS ${Arrow_DIR})
find_package(Parquet PATHS ${Arrow_DIR})
endif ()
set(Parquet_FOUND ${Parquet_FOUND} PARENT_SCOPE)

Expand Down
Loading