CMakeLists.txt 831 字节
Newer Older
1
cc_library(memory_block SRCS memory_block.cc memory_block_desc.cc meta_cache.cc DEPS place)
Y
Yi Wang 已提交
2

Y
Yi Wang 已提交
3
if(${WITH_GPU})
4
  nv_library(system_allocator SRCS system_allocator.cc DEPS gflags cpu_info gpu_info place)
Y
Yi Wang 已提交
5
else(${WITH_GPU})
6
  cc_library(system_allocator SRCS system_allocator.cc DEPS gflags cpu_info place)
Y
Yi Wang 已提交
7
endif(${WITH_GPU})
8

L
liaogang 已提交
9
cc_test(system_allocator_test SRCS system_allocator_test.cc DEPS system_allocator)
L
liaogang 已提交
10

Y
Yi Wang 已提交
11
cc_library(buddy_allocator SRCS buddy_allocator.cc DEPS memory_block system_allocator glog)
12 13

cc_test(buddy_allocator_test SRCS buddy_allocator_test.cc DEPS buddy_allocator)
14 15 16 17 18 19

if(WITH_TESTING)
  add_custom_command(TARGET buddy_allocator_test POST_BUILD
      COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../../testdata/buddy_allocator_test_data ${CMAKE_CURRENT_BINARY_DIR}/buddy_allocator_test_data
  )
endif()