Skip to content

Commit

Permalink
ARROW-17632: [Python][C++] Add details of where libarrow is being fou…
Browse files Browse the repository at this point in the history
…nd during build (apache#14059)

This PR aims to add back `message(STATUS ...)` statements that printed some details about Arrow being found, its version, and the paths. These were refactored away as part of apache#13892.

Authored-by: Dhruv Vats <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
  • Loading branch information
dhruv9vats authored and fatemehp committed Oct 17, 2022
1 parent 10bdf68 commit a2e67e3
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cpp/src/arrow/ArrowConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,18 @@ endmacro()
arrow_keep_backward_compatibility(Arrow arrow)

check_required_components(Arrow)

macro(arrow_show_details package_name variable_prefix)
if(NOT ${package_name}_FIND_QUIETLY AND NOT ${package_name}_SHOWED_DETAILS)
message(STATUS "${package_name} version: ${${package_name}_VERSION}")
message(STATUS "Found the ${package_name} shared library: ${${variable_prefix}_SHARED_LIB}"
)
message(STATUS "Found the ${package_name} import library: ${${variable_prefix}_IMPORT_LIB}"
)
message(STATUS "Found the ${package_name} static library: ${${variable_prefix}_STATIC_LIB}"
)
set(${package_name}_SHOWED_DETAILS TRUE)
endif()
endmacro()

arrow_show_details(Arrow ARROW)
2 changes: 2 additions & 0 deletions cpp/src/arrow/ArrowTestingConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/ArrowTestingTargets.cmake")
arrow_keep_backward_compatibility(ArrowTesting arrow_testing)

check_required_components(ArrowTesting)

arrow_show_details(ArrowTesting ARROW_TESTING)
2 changes: 2 additions & 0 deletions cpp/src/arrow/dataset/ArrowDatasetConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/ArrowDatasetTargets.cmake")
arrow_keep_backward_compatibility(ArrowDataset arrow_dataset)

check_required_components(ArrowDataset)

arrow_show_details(ArrowDataset ARROW_DATASET)
2 changes: 2 additions & 0 deletions cpp/src/arrow/engine/ArrowSubstraitConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/ArrowSubstraitTargets.cmake")
arrow_keep_backward_compatibility(ArrowSubstrait arrow_substrait)

check_required_components(ArrowSubstrait)

arrow_show_details(ArrowSubstrait ARROW_SUBSTRAIT)
2 changes: 2 additions & 0 deletions cpp/src/arrow/flight/ArrowFlightConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/ArrowFlightTargets.cmake")
arrow_keep_backward_compatibility(ArrowFlight arrow_flight)

check_required_components(ArrowFlight)

arrow_show_details(ArrowFlight ARROW_FLIGHT)
2 changes: 2 additions & 0 deletions cpp/src/arrow/flight/ArrowFlightTestingConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/ArrowFlightTestingTargets.cmake")
arrow_keep_backward_compatibility(ArrowFlightTetsing arrow_flight_testing)

check_required_components(ArrowFlightTesting)

arrow_show_details(ArrowFlightTesting ARROW_FLIGHT_TESTING)
2 changes: 2 additions & 0 deletions cpp/src/arrow/flight/sql/ArrowFlightSqlConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/ArrowFlightSqlTargets.cmake")
arrow_keep_backward_compatibility(ArrowFlightSql arrow_flight_sql)

check_required_components(ArrowFlightSql)

arrow_show_details(ArrowFlightSql ARROW_FLIGHT_SQL)
2 changes: 2 additions & 0 deletions cpp/src/arrow/gpu/ArrowCUDAConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/ArrowCUDATargets.cmake")
arrow_keep_backward_compatibility(ArrowCUDA arrow_cuda)

check_required_components(ArrowCUDA)

arrow_show_details(ArrowCUDA ARROW_CUDA)
2 changes: 2 additions & 0 deletions cpp/src/gandiva/GandivaConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/GandivaTargets.cmake")
arrow_keep_backward_compatibility(Gandiva gandiva)

check_required_components(Gandiva)

arrow_show_details(Gandiva GANDIVA)
2 changes: 2 additions & 0 deletions cpp/src/parquet/ParquetConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/ParquetTargets.cmake")
arrow_keep_backward_compatibility(Parquet parquet)

check_required_components(Parquet)

arrow_show_details(Parquet PARQUET)
2 changes: 2 additions & 0 deletions cpp/src/plasma/PlasmaConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/PlasmaTargets.cmake")
arrow_keep_backward_compatibility(Plasma plasma)

check_required_components(Plasma)

arrow_show_details(Plasma PLASMA)
2 changes: 2 additions & 0 deletions python/pyarrow/src/ArrowPythonConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/ArrowPythonTargets.cmake")
arrow_keep_backward_compatibility(ArrowPython arrow_python)

check_required_components(ArrowPython)

arrow_show_details(ArrowPython ARROW_PYTHON)
2 changes: 2 additions & 0 deletions python/pyarrow/src/ArrowPythonFlightConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/ArrowPythonFlightTargets.cmake")
arrow_keep_backward_compatibility(ArrowPythonFlight arrow_python_flight)

check_required_components(ArrowPythonFlight)

arrow_show_details(ArrowPythonFlight ARROW_PYTHON_FLIGHT)

0 comments on commit a2e67e3

Please sign in to comment.