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
5 changes: 3 additions & 2 deletions ci/conan/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def validate(self):

def _compute(self, required=False):
if required or self.options.compute == "auto":
return bool(self.options.dataset_modules)
return bool(self.options.dataset_modules) or bool(self.options.parquet)
else:
return bool(self.options.compute)

Expand All @@ -190,7 +190,7 @@ def _with_jemalloc(self, required=False):

def _with_re2(self, required=False):
if required or self.options.with_re2 == "auto":
return bool(self.options.gandiva)
return bool(self.options.gandiva) or bool(self._compute())
else:
return bool(self.options.with_re2)

Expand Down Expand Up @@ -340,6 +340,7 @@ def _configure_cmake(self):
self._cmake.definitions["CMAKE_SYSTEM_PROCESSOR"] = cmake_system_processor
if self.settings.compiler == "Visual Studio":
self._cmake.definitions["ARROW_USE_STATIC_CRT"] = "MT" in str(self.settings.compiler.runtime)
self._cmake.definitions["ARROW_DEFINE_OPTIONS"] = True
self._cmake.definitions["ARROW_DEPENDENCY_SOURCE"] = "SYSTEM"
self._cmake.definitions["ARROW_GANDIVA"] = self.options.gandiva
self._cmake.definitions["ARROW_PARQUET"] = self.options.parquet
Expand Down
6 changes: 6 additions & 0 deletions cpp/cmake_modules/DefineOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ endmacro()

# Top level cmake dir
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
set(ARROW_DEFINE_OPTIONS_DEFAULT ON)
else()
set(ARROW_DEFINE_OPTIONS_DEFAULT OFF)
endif()
option(ARROW_DEFINE_OPTIONS "Define Arrow options" ${ARROW_DEFINE_OPTIONS_DEFAULT})
if(ARROW_DEFINE_OPTIONS)
#----------------------------------------------------------------------
set_option_category("Compile and link")

Expand Down
18 changes: 10 additions & 8 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2440,15 +2440,17 @@ if(ARROW_WITH_RE2)
# source not uses C++ 11.
resolve_dependency(re2 HAVE_ALT TRUE)
if(${re2_SOURCE} STREQUAL "SYSTEM")
get_target_property(RE2_LIB re2::re2 IMPORTED_LOCATION_${UPPERCASE_BUILD_TYPE})
if(NOT RE2_LIB)
get_target_property(RE2_LIB re2::re2 IMPORTED_LOCATION_RELEASE)
endif()
if(NOT RE2_LIB)
get_target_property(RE2_LIB re2::re2 IMPORTED_LOCATION)
get_target_property(RE2_TYPE re2::re2 TYPE)
if(NOT RE2_TYPE STREQUAL "INTERFACE_LIBRARY")
get_target_property(RE2_LIB re2::re2 IMPORTED_LOCATION_${UPPERCASE_BUILD_TYPE})
if(NOT RE2_LIB)
get_target_property(RE2_LIB re2::re2 IMPORTED_LOCATION_RELEASE)
endif()
if(NOT RE2_LIB)
get_target_property(RE2_LIB re2::re2 IMPORTED_LOCATION)
endif()
string(APPEND ARROW_PC_LIBS_PRIVATE " ${RE2_LIB}")
endif()

string(APPEND ARROW_PC_LIBS_PRIVATE " ${RE2_LIB}")
endif()
add_definitions(-DARROW_WITH_RE2)
endif()
Expand Down