WillAyd commented on code in PR #511:
URL: https://github.com/apache/arrow-nanoarrow/pull/511#discussion_r1633504181
##########
CMakeLists.txt:
##########
@@ -310,10 +433,82 @@ if(NANOARROW_BUILD_TESTS)
gtest_discover_tests(nanoarrow_hpp_test DISCOVERY_TIMEOUT 10)
gtest_discover_tests(nanoarrow_testing_test DISCOVERY_TIMEOUT 10)
gtest_discover_tests(c_data_integration_test DISCOVERY_TIMEOUT 10)
+
+ if(NANOARROW_IPC)
+
+ # zlib to decode gzipped integration testing JSON files
+ # We don't use Arrow C++ for this because building Arrow C++ with zlib
+ # is not trivial on Windows.
+ find_package(ZLIB)
+ if(NOT ZLIB_FOUND)
+ # Wrapper around FetchContent that better isolates the zlib
CMakeLists.txt
+ message(STATUS "Using FetchContent to build a static zlib")
+ add_subdirectory(thirdparty/zlib)
+ endif()
+
+ enable_testing()
+
+ add_executable(nanoarrow_ipc_decoder_test
src/nanoarrow/nanoarrow_ipc_decoder_test.cc)
+ add_executable(nanoarrow_ipc_reader_test
src/nanoarrow/nanoarrow_ipc_reader_test.cc)
+ add_executable(nanoarrow_ipc_files_test
src/nanoarrow/nanoarrow_ipc_files_test.cc)
+ add_executable(nanoarrow_ipc_hpp_test
src/nanoarrow/nanoarrow_ipc_hpp_test.cc)
+
+ if(NANOARROW_CODE_COVERAGE)
+ target_compile_options(ipc_coverage_config INTERFACE -O0 -g --coverage)
+ target_link_options(ipc_coverage_config INTERFACE --coverage)
+ target_link_libraries(nanoarrow_ipc PRIVATE ipc_coverage_config)
+ endif()
+ target_link_libraries(nanoarrow_ipc_decoder_test
+ nanoarrow_ipc
+ nanoarrow
+ flatccrt
+ ${NANOARROW_ARROW_TARGET}
+ gtest_main
+ ipc_coverage_config)
+ target_include_directories(nanoarrow_ipc_decoder_test
+ PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
+ $<INSTALL_INTERFACE:include>)
Review Comment:
Thanks for catching this - mistake on my end. I got confused while trying to
get tests to find the proper include paths when bundled, but the actual fix
needed was elsewhere.
--
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]