CMakeLists.txt 1.98 KB
Newer Older
1
2
cmake_minimum_required (VERSION 2.6)

3
4
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../middletier)
5

6
7
8
9
10
11
12
13

find_package(Protobuf)

set (CTAProtoFiles
  cta.proto)

PROTOBUF_GENERATE_CPP(CTAProtoSources CTAProtoHeaders ${CTAProtoFiles})

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
set (CTAProtoDependants objectstore/Agent.hpp
  objectstore/ArchiveToFileRequest.hpp
  objectstore/CreationLog.hpp
  objectstore/GenericObject.hpp
  objectstore/ObjectOps.cpp
  objectstore/ObjectOps.hpp
  objectstore/RetrieveToFileRequest.cpp
  objectstore/RetrieveToFileRequest.hpp
  objectstore/RootEntry.hpp
  objectstore/SchedulerGlobalLock.hpp
  objectstore/Tape.hpp
  objectstore/TapePool.hpp
  objectstore/UserIdentity.hpp)

SET_SOURCE_FILES_PROPERTIES(${CTAProtoHeaders} PROPERTIES HEADER_FILE_ONLY TRUE)
SET_SOURCE_FILES_PROPERTIES(${CTAProtoDependants} 
  PROPERTIES OBJECT_DEPENDS ${CTAProtoHeaders})


33
add_library (CTAObjectStore
34
  ${CTAProtoSources}
35
36
37
  RootEntry.cpp
  Agent.cpp
  AgentRegister.cpp
38
  AgentWatchdog.cpp
39
  TapePool.cpp
40
  Tape.cpp
41
  ArchiveToFileRequest.cpp
42
  RetrieveToFileRequest.cpp
Eric Cano's avatar
Eric Cano committed
43
  DriveRegister.cpp
44
  BackendVFS.cpp
45
  BackendRados.cpp
46
  BackendPopulator.cpp
47
  BackendFactory.cpp
48
  ObjectOps.cpp
49
  ProtocolBuffersAlgorithms.cpp
50
  GenericObject.cpp
51
52
  GarbageCollector.cpp
  SchedulerGlobalLock.cpp)
53
target_link_libraries(CTAObjectStore Utils rados)
54
set_source_files_properties(BackendRados.cpp PROPERTIES COMPILE_FLAGS -Wno-deprecated-declarations)
55

56
set(ObjectStoreUnitTests
57
58
  BackendTest.cpp
  RootEntryTest.cpp
59
  TapeTest.cpp
60
  GarbageCollectorTest.cpp
61
  ArchiveToFileRequestTest.cpp
62
)
63

Eric Cano's avatar
Eric Cano committed
64
65
add_library(ctaobjectstoreunittests SHARED ${ObjectStoreUnitTests})
target_link_libraries(ctaobjectstoreunittests
66
  protobuf rados ctacommon gtest gmock CTAObjectStore)
67
68
69

add_executable(makeMinimalVFS makeMinimalVFS.cpp)
target_link_libraries(makeMinimalVFS
70
71
72
73
74
  protobuf CTAObjectStore ctacommon)

add_executable(listObjectStore listObjectStore.cpp)
target_link_libraries(listObjectStore
  protobuf CTAObjectStore ctacommon)