CMakeLists.txt 2.37 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

Steven Murray's avatar
Steven Murray committed
7
find_package(json-c REQUIRED)
8
find_package(Protobuf REQUIRED)
9
10
11
12
13
14

set (CTAProtoFiles
  cta.proto)

PROTOBUF_GENERATE_CPP(CTAProtoSources CTAProtoHeaders ${CTAProtoFiles})

15
16
set (CTAProtoDependants objectstore/Agent.hpp
  objectstore/ArchiveToFileRequest.hpp
Daniele Kruse's avatar
Daniele Kruse committed
17
  objectstore/ArchiveRequest.hpp
18
19
20
  objectstore/CreationLog.hpp
  objectstore/GenericObject.hpp
  objectstore/ObjectOps.hpp
21
  objectstore/RetrieveRequest.hpp
22
23
24
25
26
27
28
29
30
31
32
33
34
  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
35
add_library (ctaobjectstore SHARED
36
  ${CTAProtoSources}
37
38
39
  RootEntry.cpp
  Agent.cpp
  AgentRegister.cpp
40
  AgentWatchdog.cpp
41
  TapePool.cpp
42
  Tape.cpp
43
  ArchiveToFileRequest.cpp
Daniele Kruse's avatar
Daniele Kruse committed
44
  ArchiveRequest.cpp
45
  RetrieveToFileRequest.cpp
46
  RetrieveRequest.cpp
Eric Cano's avatar
Eric Cano committed
47
  DriveRegister.cpp
48
  BackendVFS.cpp
49
  BackendRados.cpp
50
  BackendPopulator.cpp
51
  BackendFactory.cpp
52
  ProtocolBuffersAlgorithms.cpp
53
  GenericObject.cpp
54
55
  GarbageCollector.cpp
  SchedulerGlobalLock.cpp)
56
target_link_libraries(ctaobjectstore Utils rados json-c ctautils)
57
set_source_files_properties(BackendRados.cpp PROPERTIES COMPILE_FLAGS -Wno-deprecated-declarations)
Eric Cano's avatar
Eric Cano committed
58
install (TARGETS ctaobjectstore DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
59

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

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

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

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

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