CMakeLists.txt 1.73 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
cmake_minimum_required (VERSION 2.6)

include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_BINARY_DIR})

find_package(Protobuf)

set (CTAProtoFiles
  cta.proto)

PROTOBUF_GENERATE_CPP(CTAProtoSources CTAProtoHeaders ${CTAProtoFiles})

13
add_library (CTAObjectStore 
14
  ${CTAProtoSources}
15
16
17
  RootEntry.cpp
  Agent.cpp
  AgentRegister.cpp
18
  AgentWatchdog.cpp
19
  AdminUsersList.cpp
20
  BackendVFS.cpp
21
  BackendRados.cpp
22
  ObjectOps.cpp
23
  ProtocolBuffersAlgorithms.cpp
24
  FIFO.cpp
25
26
  GenericObject.cpp
  GarbageCollector.cpp
27
28
29
30
31
32
  exception/Backtrace.cpp
  exception/Errnum.cpp
  exception/Exception.cpp
  exception/strerror_r_wrapper.cpp
  threading/ChildProcess.cpp
  threading/Mutex.cpp
33
34
  threading/Threading.cpp
  utils/Timer.cpp)
35

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# add_executable(tapeResourceManagerTest tapeResourceManagerTest.cpp)
# target_link_libraries(tapeResourceManagerTest
#   protobuf rados CTAObjectStore)
# 
# add_executable(dumpStructure dumpStructure.cpp)
# target_link_libraries(dumpStructure
#   protobuf rados CTAObjectStore)
# 
# add_executable(jobPoster jobPoster.cpp)
# target_link_libraries(jobPoster
#   protobuf rados CTAObjectStore)
# 
# add_executable(recaller recaller.cpp)
# target_link_libraries(recaller
#   protobuf rados CTAObjectStore)
# 
# add_executable(garbageCollector garbageCollector.cpp)
# target_link_libraries(garbageCollector
#   protobuf rados CTAObjectStore)
# 
# add_executable(createEnvironment createEnvironment.cpp)
# target_link_libraries(createEnvironment
#   protobuf rados CTAObjectStore)

60
set(ObjectStoreUnitTests
61
62
  BackendTest.cpp
  RootEntryTest.cpp
63
  FIFOTest.cpp
64
  GarbageCollectorTest.cpp
65
)
66
67

add_executable(unitTests unitTests.cpp ${ObjectStoreUnitTests})
68
target_link_libraries(unitTests
69
  protobuf rados CTAObjectStore gtest gmock)