CMakeLists.txt 2.27 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})


Eric Cano's avatar
Eric Cano committed
33
add_library (ctaobjectstore SHARED
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 json-c ctautils)
54
set_source_files_properties(BackendRados.cpp PROPERTIES COMPILE_FLAGS -Wno-deprecated-declarations)
Eric Cano's avatar
Eric Cano committed
55
install (TARGETS ctaobjectstore DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
56

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

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

add_executable(makeMinimalVFS makeMinimalVFS.cpp)
target_link_libraries(makeMinimalVFS
72
  protobuf ctaobjectstore ctacommon ctautils)
73
74
75

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

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