CMakeLists.txt 1.96 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
  BackendFactory.cpp
47
  ObjectOps.cpp
48
  ProtocolBuffersAlgorithms.cpp
49
  GenericObject.cpp
50
51
  GarbageCollector.cpp
  SchedulerGlobalLock.cpp)
52
target_link_libraries(CTAObjectStore Utils rados)
53
set_source_files_properties(BackendRados.cpp PROPERTIES COMPILE_FLAGS -Wno-deprecated-declarations)
54

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

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

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

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