CMakeLists.txt 4.59 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# The CERN Tape Archive(CTA) project
# Copyright(C) 2015  CERN
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

Eric Cano's avatar
Eric Cano committed
17
18
cmake_minimum_required (VERSION 2.6)

19
20
21
find_package (binutils REQUIRED)
find_package (libattr REQUIRED)
find_package (libcap REQUIRED)
22
find_package (libuuid REQUIRED)
23

24
25
add_subdirectory (exception)

26
set (COMMON_LIB_SRC_FILES
27
28
29
  dataStructures/AdminHost.cpp
  dataStructures/AdminUser.cpp
  dataStructures/ArchiveFile.cpp
Steven Murray's avatar
Steven Murray committed
30
  dataStructures/ArchiveFileQueueCriteria.cpp
31
  dataStructures/ArchiveFileSummary.cpp
32
33
34
35
36
  dataStructures/ArchiveJob.cpp
  dataStructures/ArchiveRequest.cpp
  dataStructures/ArchiveRoute.cpp
  dataStructures/CancelRetrieveRequest.cpp
  dataStructures/DeleteArchiveRequest.cpp
37
  dataStructures/DiskFileInfo.cpp
38
  dataStructures/DriveState.cpp
39
  dataStructures/DriveStatus.cpp
40
  dataStructures/EntryLog.cpp
41
  dataStructures/FrontendReturnCode.cpp
42
  dataStructures/ListStorageClassRequest.cpp
43
  dataStructures/LogicalLibrary.cpp
44
  dataStructures/MountType.cpp
45
  dataStructures/MountPolicy.cpp
46
47
  dataStructures/ReadTestResult.cpp
  dataStructures/RepackInfo.cpp
48
  dataStructures/RepackType.cpp
49
50
  dataStructures/RequesterGroupMountRule.cpp
  dataStructures/RequesterMountRule.cpp
51
52
53
54
55
  dataStructures/RetrieveJob.cpp
  dataStructures/RetrieveRequest.cpp
  dataStructures/SecurityIdentity.cpp
  dataStructures/StorageClass.cpp
  dataStructures/Tape.cpp
56
  dataStructures/TapeFile.cpp
57
  dataStructures/TapeLog.cpp
58
  dataStructures/TapePool.cpp
59
  dataStructures/TestSourceType.cpp
60
  dataStructures/UpdateFileInfoRequest.cpp
61
  dataStructures/UpdateFileStorageClassRequest.cpp
62
63
64
  dataStructures/UserIdentity.cpp
  dataStructures/VerifyInfo.cpp
  dataStructures/WriteTestResult.cpp
65
  dataStructures/utils.cpp
66
67
68
69
  admin/AdminHost.cpp
  admin/AdminUser.cpp
  archiveRoutes/ArchiveRoute.cpp
  checksum/Checksum.cpp
Eric Cano's avatar
Eric Cano committed
70
71
72
  exception/Backtrace.cpp
  exception/Errnum.cpp
  exception/Exception.cpp
73
  exception/NonRetryableError.cpp
74
75
  exception/RetryableError.cpp
  exception/UserError.cpp
76
  exception/AcceptConnectionInterrupted.cpp
77
  exception/BadAlloc.cpp
78
  exception/CommandLineNotParsed.cpp
79
  exception/InvalidArgument.cpp
80
  exception/InvalidConfigEntry.cpp
81
  exception/MissingOperand.cpp
82
  exception/NoEntry.cpp
83
  exception/NoPortInRange.cpp
84
  exception/NotAnOwner.cpp
85
  exception/OutOfMemory.cpp
86
  exception/TimeOut.cpp
87
88
89
90
91
92
93
  log/DummyLogger.cpp
  log/LogContext.cpp
  log/Logger.cpp
  log/Message.cpp
  log/Param.cpp
  log/StringLogger.cpp
  log/SyslogLogger.cpp
94
  log/StdoutLogger.cpp
95
96
97
  priorities/DriveQuota.cpp
  priorities/MountCriteria.cpp
  priorities/UserGroup.cpp
98
  processCap/ProcessCap.cpp
99
  processCap/ProcessCapDummy.cpp
100
  processCap/SmartCap.cpp
101
102
103
  remoteFS/RemoteFileStatus.cpp
  remoteFS/RemotePath.cpp
  remoteFS/RemotePathAndStatus.cpp
Steven Murray's avatar
Steven Murray committed
104
  SmartFd.cpp
Eric Cano's avatar
Eric Cano committed
105
  threading/ChildProcess.cpp
106
  threading/Daemon.cpp
Eric Cano's avatar
Eric Cano committed
107
  threading/Mutex.cpp
108
  threading/SocketPair.cpp
109
  threading/System.cpp
110
  threading/Threading.cpp
111
  threading/Semaphores.cpp
112
  utils/utils.cpp
113
114
115
116
117
  utils/strerror_r_wrapper.cpp
  CreationLog.cpp
  Configuration.cpp
  TapePool.cpp
  Timer.cpp
118
  UserIdentity.cpp
119
  VO.cpp)
Eric Cano's avatar
Eric Cano committed
120

121
122
add_library (ctacommon SHARED
  ${COMMON_LIB_SRC_FILES})
123
install (TARGETS ctacommon DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
Eric Cano's avatar
Eric Cano committed
124

125
target_link_libraries (ctacommon
126
  ctautils
Steven Murray's avatar
Steven Murray committed
127
  pthread
128
  uuid
129
  z
130
131
  Utils
  cap)
Eric Cano's avatar
Eric Cano committed
132

133
set (COMMON_UNIT_TESTS_LIB_SRC_FILES
134
  checksum/ChecksumTest.cpp
135
  dataStructures/ArchiveFileTest.cpp
136
  dataStructures/StorageClassTest.cpp
137
  processCap/SmartCapTest.cpp
138
139
140
  log/LogContextTest.cpp
  log/ParamTest.cpp
  log/SyslogLoggerTest.cpp
141
  log/StringLoggerTest.cpp
142
  remoteFS/RemotePathTest.cpp
Steven Murray's avatar
Steven Murray committed
143
  SmartFdTest.cpp
144
  threading/DaemonTest.cpp
145
  threading/SocketPairTest.cpp
146
147
148
149
150
  threading/ThreadingBlockingQTests.cpp
# threading/ThreadingMPTests.cpp is commented out because of errors caused by libust
  threading/ThreadingMTTests.cpp
  threading/ThreadingTests.cpp
  threading/AtomicCounterTest.cpp
151
  utils/UtilsTest.cpp
152
153
  UserIdentityTest.cpp
  optionalTest.cpp)
Eric Cano's avatar
Eric Cano committed
154

155
156
add_library (ctacommonunittests SHARED
  ${COMMON_UNIT_TESTS_LIB_SRC_FILES})
157

158
install(TARGETS ctacommonunittests DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
159