kevingurney commented on a change in pull request #10614:
URL: https://github.com/apache/arrow/pull/10614#discussion_r660973945



##########
File path: matlab/CMakeLists.txt
##########
@@ -72,3 +89,28 @@ else()
   set_target_properties(featherwritemex PROPERTIES LIBRARY_OUTPUT_DIRECTORY
                                                    
$<1:${CMAKE_SOURCE_DIR}/src>)
 endif()
+
+# ######################
+# GoogleTest Integration
+# ######################
+# If the user has specified a GTEST_ROOT value, use their pre-built GoogleTest 
binaries.
+# Otherwise, download and build GoogleTest automatically.
+if(GTEST_ROOT)
+  find_package(GTest REQUIRED)
+else()
+  download_and_build_google_test()

Review comment:
       Setting `GTEST_ROOT` to `${ARROW_BUILD_DIR}/googletest_ep-prefix` inside 
the `CMakeLists.txt` for MATLAB seems like a reasonable approach.
   
   If we could automatically trigger a build of the Arrow C++ libraries with 
`ARROW_BUILD_TESTS=ON` (in order to get GoogleTest to be built in 
`${ARROW_BUILD_DIR}/googletest_ep-prefix`) from the MATLAB `CMakeLists.txt` 
file, that would be great. But, I'm not sure what the best approach is to 
accomplish this.
   
   It seems like it would be error prone to expect users to manually build the 
Arrow C++ libraries first due to the variation in names they might use for 
their CMake build folder, as well as the different flags they might pass to the 
build (e.g. they might forget to include `-DARROW_BUILD_TESTS=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]


Reply via email to