diff --git a/cpp/src/arrow/compute/CMakeLists.txt b/cpp/src/arrow/compute/CMakeLists.txt index 6d11aa26c01..6f740e86eed 100644 --- a/cpp/src/arrow/compute/CMakeLists.txt +++ b/cpp/src/arrow/compute/CMakeLists.txt @@ -48,7 +48,7 @@ if(ARROW_TESTING AND ARROW_COMPUTE) add_library(arrow_compute_testing OBJECT ${ARROW_COMPUTE_TESTING_SRCS}) # Even though this is still just an object library we still need to "link" # arrow_compute_core_testing so that is also included correctly - if(MSVC AND MSVC_VERSION LESS 1930) + if(MSVC) target_link_libraries(arrow_compute_testing PUBLIC $ PUBLIC ${ARROW_GTEST_GTEST_MAIN}) diff --git a/cpp/src/arrow/compute/test_env.cc b/cpp/src/arrow/compute/test_env.cc index 901a0056474..b035b8ca035 100644 --- a/cpp/src/arrow/compute/test_env.cc +++ b/cpp/src/arrow/compute/test_env.cc @@ -35,7 +35,7 @@ class ComputeKernelEnvironment : public ::testing::Environment { } // namespace -#if defined(_MSC_VER) && _MSC_VER < 1930 +#ifdef _MSC_VER // Initialize the compute module ::testing::Environment* compute_kernels_env = ::testing::AddGlobalTestEnvironment(new ComputeKernelEnvironment); @@ -43,7 +43,7 @@ ::testing::Environment* compute_kernels_env = } // namespace arrow::compute -#if !(defined(_MSC_VER) && _MSC_VER < 1930) +#ifndef _MSC_VER int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); ::testing::AddGlobalTestEnvironment(new arrow::compute::ComputeKernelEnvironment);