CMakeLists.txt 2.32 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
set (CTAProtoDependants objectstore/Agent.hpp
  objectstore/ArchiveToFileRequest.hpp
Daniele Kruse's avatar
Daniele Kruse committed
16
  objectstore/ArchiveRequest.hpp
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  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})


Eric Cano's avatar
Eric Cano committed
34
add_library (ctaobjectstore SHARED
35
  ${CTAProtoSources}
36
37
38
  RootEntry.cpp
  Agent.cpp
  AgentRegister.cpp
39
  AgentWatchdog.cpp
40
  TapePool.cpp
41
  Tape.cpp
42
  ArchiveToFileRequest.cpp
Daniele Kruse's avatar
Daniele Kruse committed
43
  ArchiveRequest.cpp
44
  RetrieveToFileRequest.cpp
Eric Cano's avatar
Eric Cano committed
45
  DriveRegister.cpp
46
  BackendVFS.cpp
47
  BackendRados.cpp
48
  BackendPopulator.cpp
49
  BackendFactory.cpp
50
  ObjectOps.cpp
51
  ProtocolBuffersAlgorithms.cpp
52
  GenericObject.cpp
53
54
  GarbageCollector.cpp
  SchedulerGlobalLock.cpp)
55
target_link_libraries(ctaobjectstore Utils rados json-c ctautils)
56
set_source_files_properties(BackendRados.cpp PROPERTIES COMPILE_FLAGS -Wno-deprecated-declarations)
Eric Cano's avatar
Eric Cano committed
57
install (TARGETS ctaobjectstore DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
58

59
set(ObjectStoreUnitTests
60
61
  BackendTest.cpp
  RootEntryTest.cpp
62
  TapeTest.cpp
63
  GarbageCollectorTest.cpp
64
  ArchiveToFileRequestTest.cpp
65
)
66

Eric Cano's avatar
Eric Cano committed
67
68
add_library(ctaobjectstoreunittests SHARED ${ObjectStoreUnitTests})
target_link_libraries(ctaobjectstoreunittests
Steven Murray's avatar
Steven Murray committed
69
  protobuf rados ctacommon gtest ctaobjectstore)
70
install(TARGETS ctaobjectstoreunittests DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
71
72
73

add_executable(makeMinimalVFS makeMinimalVFS.cpp)
target_link_libraries(makeMinimalVFS
74
  protobuf ctaobjectstore ctacommon ctautils)
75
76
77

add_executable(listObjectStore listObjectStore.cpp)
target_link_libraries(listObjectStore
Eric Cano's avatar
Eric Cano committed
78
  protobuf ctaobjectstore ctacommon)
Eric Cano's avatar
Eric Cano committed
79
80
81

add_executable(dumpObject dumpObject.cpp)
target_link_libraries(dumpObject
Steven Murray's avatar
Steven Murray committed
82
  protobuf ctaobjectstore ctacommon)