kevingurney commented on a change in pull request #10614:
URL: https://github.com/apache/arrow/pull/10614#discussion_r660976175
##########
File path: matlab/CMakeLists.txt
##########
@@ -17,6 +17,23 @@
cmake_minimum_required(VERSION 3.20)
+# This function uses the ThirdpartyToolchain CMake module
+# in cpp/cmake_modules to automatically download and build GoogleTest.
+function(download_and_build_google_test)
+ # The ExternalProject module is required for downloading and building
external dependencies.
+ include(ExternalProject)
+ # The ThirdpartyToolchain module automatically builds xsimd by default,
+ # so we explicitly disable building of xsimd here.
+ set(ARROW_SIMD_LEVEL "NONE")
+ set(ARROW_RUNTIME_SIMD_LEVEL "NONE")
+ # The ThirdpartyToolchain module must know the location of the Arrow C++
libraries source code.
+ set(arrow_SOURCE_DIR ${CMAKE_SOURCE_DIR}/../cpp)
+ # The ThirdpartyToolchain module uses ExternalProject to download GoogleTest.
+ include(ThirdpartyToolchain)
Review comment:
See my comment below.
It sounds like depending on `ThirdpartyToolchain` may not be desirable
without first refactoring it to make it more reusable. Given this fact, I'm
fine with instead pursuing the approach of trying to automatically build the
Arrow C++ libraries first and then depending on the bundled GoogleTest binaries
that are built when `ARROW_BUILD_TESTS` is set to `on`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]