kevingurney commented on a change in pull request #10614:
URL: https://github.com/apache/arrow/pull/10614#discussion_r661619865
##########
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:
@kou - we tried invoking an automatic build of the Arrow C++ libraries
(and the bundled GoogleTest binaries) from `matlab/CMakeLists.txt` using:
```cmake
ExternalProject_Add(ArrowCpp SOURCE_DIR "${CMAKE_SOURCE_DIR}/../cpp"
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=. -DARROW_BUILD_TESTS=ON)
```
This did allow us to run `make ArrowCpp` to build the C++ libraries, but,
this doesn't seem to be exporting targets for `arrow_shared` or `GTest::GTest`
that we can link MEX files against. Admittedly, I am not very familiar with
`ExternalProject_Add`, so I am guessing things aren't that simple.
Is this the kind of approach you were thinking of? Or, were you thinking
that users would be expected to **manually** build the Arrow C++ libraries
first, in order to get access to the bundled GoogleTest binares (i.e. similar
to
https://github.com/apache/arrow/blob/master/docs/source/developers/python.rst#build-and-test)?
--
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]