CMakeLists.txt 4.12 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
82
83
84
85
86
87
  log/DummyLogger.cpp
  log/LogContext.cpp
  log/Logger.cpp
  log/Message.cpp
  log/Param.cpp
  log/StringLogger.cpp
  log/SyslogLogger.cpp
88
  log/StdoutLogger.cpp
89
90
91
  priorities/DriveQuota.cpp
  priorities/MountCriteria.cpp
  priorities/UserGroup.cpp
92
93
  processCap/ProcessCap.cpp
  processCap/SmartCap.cpp
94
95
96
  remoteFS/RemoteFileStatus.cpp
  remoteFS/RemotePath.cpp
  remoteFS/RemotePathAndStatus.cpp
Eric Cano's avatar
Eric Cano committed
97
  threading/ChildProcess.cpp
98
  threading/Daemon.cpp
Eric Cano's avatar
Eric Cano committed
99
  threading/Mutex.cpp
100
  threading/SocketPair.cpp
101
  threading/System.cpp
102
  threading/Threading.cpp
103
  utils/utils.cpp
104
105
106
107
108
  utils/strerror_r_wrapper.cpp
  CreationLog.cpp
  Configuration.cpp
  TapePool.cpp
  Timer.cpp
109
  UserIdentity.cpp
110
  VO.cpp)
Eric Cano's avatar
Eric Cano committed
111

112
113
add_library (ctacommon SHARED
  ${COMMON_LIB_SRC_FILES})
114
install (TARGETS ctacommon DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
Eric Cano's avatar
Eric Cano committed
115

116
target_link_libraries (ctacommon
117
  ctautils
Steven Murray's avatar
Steven Murray committed
118
  pthread
119
  uuid
120
  z
121
122
  Utils
  cap)
Eric Cano's avatar
Eric Cano committed
123

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

139
140
add_library (ctacommonunittests SHARED
  ${COMMON_UNIT_TESTS_LIB_SRC_FILES})
141

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