@@ -351,31 +351,25 @@ set(ARROW_TESTING_SRCS
351
351
testing/util.cc)
352
352
353
353
# Add dependencies for third-party allocators.
354
- # If possible we only want memory_pool.cc to wait for allocators to finish building,
354
+ # If possible we only want memory_pool{_jemalloc} .cc to wait for allocators to finish building,
355
355
# but that only works with Ninja
356
356
# (see https://gitlab.kitware.com/cmake/cmake/issues/19677)
357
357
358
- set (_allocator_dependencies "" ) # Empty list
359
358
if (jemalloc_VENDORED)
360
- list (APPEND _allocator_dependencies jemalloc_ep)
359
+ if ("${CMAKE_GENERATOR} " STREQUAL "Ninja" )
360
+ set_source_files_properties (memory_pool_jemalloc.cc PROPERTIES OBJECT_DEPENDS jemalloc_ep)
361
+ else ()
362
+ add_dependencies (arrow_dependencies jemalloc_ep)
363
+ endif ()
361
364
endif ()
362
365
if (mimalloc_VENDORED)
363
- list (APPEND _allocator_dependencies mimalloc_ep)
364
- endif ()
365
-
366
- if (_allocator_dependencies)
367
366
if ("${CMAKE_GENERATOR} " STREQUAL "Ninja" )
368
- set_source_files_properties (memory_pool.cc PROPERTIES OBJECT_DEPENDS
369
- "${_allocator_dependencies} " )
367
+ set_source_files_properties (memory_pool.cc PROPERTIES OBJECT_DEPENDS mimalloc_ep)
370
368
else ()
371
- add_dependencies (arrow_dependencies ${_allocator_dependencies} )
369
+ add_dependencies (arrow_dependencies mimalloc_ep )
372
370
endif ()
373
- set_source_files_properties (memory_pool.cc PROPERTIES SKIP_PRECOMPILE_HEADERS ON
374
- SKIP_UNITY_BUILD_INCLUSION ON )
375
371
endif ()
376
372
377
- unset (_allocator_dependencies)
378
-
379
373
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
380
374
set_property (SOURCE util/io_util.cc
381
375
APPEND_STRING
0 commit comments