File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,9 +48,16 @@ if(ARROW_TESTING AND ARROW_COMPUTE)
4848 add_library (arrow_compute_testing OBJECT ${ARROW_COMPUTE_TESTING_SRCS} )
4949 # Even though this is still just an object library we still need to "link"
5050 # arrow_compute_core_testing so that is also included correctly
51- target_link_libraries (arrow_compute_testing
52- PUBLIC $<TARGET_OBJECTS :arrow_compute_core_testing >
53- PUBLIC ${ARROW_GTEST_GTEST} )
51+ if (WIN32 )
52+ target_link_libraries (arrow_compute_testing
53+ PUBLIC $<TARGET_OBJECTS :arrow_compute_core_testing >
54+ PUBLIC ${ARROW_GTEST_GTEST_MAIN} )
55+ else ()
56+ target_link_libraries (arrow_compute_testing
57+ PUBLIC $<TARGET_OBJECTS :arrow_compute_core_testing >
58+ PUBLIC ${ARROW_GTEST_GTEST} )
59+ endif ()
60+
5461endif ()
5562
5663set (ARROW_COMPUTE_TEST_PREFIX "arrow-compute" )
Original file line number Diff line number Diff line change @@ -34,10 +34,19 @@ class ComputeKernelEnvironment : public ::testing::Environment {
3434};
3535
3636} // namespace
37+
38+ #ifdef _WIN32
39+ // Initialize the compute module
40+ ::testing::Environment* compute_kernels_env =
41+ ::testing::AddGlobalTestEnvironment (new ComputeKernelEnvironment);
42+ #endif
43+
3744} // namespace arrow::compute
3845
46+ #ifndef _WIN32
3947int main (int argc, char ** argv) {
4048 ::testing::InitGoogleTest (&argc, argv);
4149 ::testing::AddGlobalTestEnvironment (new arrow::compute::ComputeKernelEnvironment);
4250 return RUN_ALL_TESTS ();
4351}
52+ #endif
You can’t perform that action at this time.
0 commit comments