diff --git a/CMakeLists.txt b/CMakeLists.txt index 98f5aad6..e9ff8290 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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.") + endif() + find_arrow_parquet_config() +endif () + if (YGM_INSTALL_PARQUET) install_arrow_parquet() endif () diff --git a/cmake/FindArrowParquet.cmake b/cmake/FindArrowParquet.cmake index 7274d376..69d684ca 100644 --- a/cmake/FindArrowParquet.cmake +++ b/cmake/FindArrowParquet.cmake @@ -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() @@ -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)