Skip to content
Closed
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: 6 additions & 2 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -620,8 +620,12 @@ endif()
# ----------------------------------------------------------------------
# ExternalProject options

set(EP_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}}")
set(EP_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${UPPERCASE_BUILD_TYPE}}")
set(
EP_CXX_FLAGS
"${CMAKE_CXX_COMPILER_ARG1} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}}"
)
set(EP_C_FLAGS
"${CMAKE_C_COMPILER_ARG1} ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${UPPERCASE_BUILD_TYPE}}")

if(NOT MSVC_TOOLCHAIN)
# Set -fPIC on all external projects
Expand Down
3 changes: 3 additions & 0 deletions r/R/arrow-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,14 @@ arrow_info <- function() {
if (out$libarrow) {
pool <- default_memory_pool()
runtimeinfo <- runtime_info()
compute_funcs <- list_compute_functions()
out <- c(out, list(
capabilities = c(
dataset = arrow_with_dataset(),
parquet = arrow_with_parquet(),
s3 = arrow_with_s3(),
utf8proc = "utf8_upper" %in% compute_funcs,
re2 = "replace_substring_regex" %in% compute_funcs,
vapply(tolower(names(CompressionType)[-1]), codec_is_available, logical(1))
),
memory_pool = list(
Expand Down
27 changes: 9 additions & 18 deletions r/tests/testthat/helper-skip.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,16 @@
# specific language governing permissions and limitations
# under the License.

build_features <- c(
arrow_info()$capabilities,
# Special handling for "uncompressed", for tests that iterate over compressions
uncompressed = TRUE
)

skip_if_not_available <- function(feature) {
if (feature == "dataset") {
skip_if_not(arrow_with_dataset())
} else if (feature == "parquet") {
skip_if_not(arrow_with_parquet())
} else if (feature %in% c("string", "utf8proc")) {
skip_if_not(
"utf8_upper" %in% list_compute_functions(),
"Arrow C++ library not built with utf8proc dependency"
)
} else if (feature %in% c("regex", "re2")) {
skip_if_not(
"replace_substring_regex" %in% list_compute_functions(),
"Arrow C++ library not built with re2 dependency"
)
} else if (feature == "s3") {
skip_if_not(arrow_with_s3())
} else if (!codec_is_available(feature)) {
skip(paste("Arrow C++ not built with support for", feature))
yes <- feature %in% names(build_features) && build_features[feature]
if (!yes) {
skip(paste("Arrow C++ not built with", feature))
}
}

Expand Down