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

115
116
add_library (ctacommon SHARED
  ${COMMON_LIB_SRC_FILES})
117
install (TARGETS ctacommon DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
Eric Cano's avatar
Eric Cano committed
118

119
target_link_libraries (ctacommon
120
  ctautils
Steven Murray's avatar
Steven Murray committed
121
  pthread
122
  uuid
123
  z
124
125
  Utils
  cap)
Eric Cano's avatar
Eric Cano committed
126

127
set (COMMON_UNIT_TESTS_LIB_SRC_FILES
128
  checksum/ChecksumTest.cpp
129
  dataStructures/ArchiveFileTest.cpp
130
  dataStructures/StorageClassTest.cpp
131
132
133
  log/LogContextTest.cpp
  log/ParamTest.cpp
  log/SyslogLoggerTest.cpp
134
  log/StringLoggerTest.cpp
135
  remoteFS/RemotePathTest.cpp
136
  threading/DaemonTest.cpp
137
  threading/SocketPairTest.cpp
138
  utils/UtilsTest.cpp
139
140
  UserIdentityTest.cpp
  optionalTest.cpp)
Eric Cano's avatar
Eric Cano committed
141

142
143
add_library (ctacommonunittests SHARED
  ${COMMON_UNIT_TESTS_LIB_SRC_FILES})
144

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