CMakeLists.txt 4.04 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/Dedication.cpp
35
  dataStructures/DedicationType.cpp
36
  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
  admin/AdminHost.cpp
  admin/AdminUser.cpp
  archiveRoutes/ArchiveRoute.cpp
69
70
71
72
73
#  archiveNS/ArchiveFile.cpp
#  archiveNS/ArchiveFileStatus.cpp
#  archiveNS/StorageClass.cpp
#  archiveNS/Tape.cpp
#  archiveNS/TapeFileLocation.cpp
74
  checksum/Checksum.cpp
Eric Cano's avatar
Eric Cano committed
75
76
77
  exception/Backtrace.cpp
  exception/Errnum.cpp
  exception/Exception.cpp
78
  exception/UserError.cpp
79
  exception/NonRetryableError.cpp
80
81
82
83
84
85
86
  log/DummyLogger.cpp
  log/LogContext.cpp
  log/Logger.cpp
  log/Message.cpp
  log/Param.cpp
  log/StringLogger.cpp
  log/SyslogLogger.cpp
87
  log/StdoutLogger.cpp
88
89
90
  priorities/DriveQuota.cpp
  priorities/MountCriteria.cpp
  priorities/UserGroup.cpp
91
92
  processCap/ProcessCap.cpp
  processCap/SmartCap.cpp
93
94
95
  remoteFS/RemoteFileStatus.cpp
  remoteFS/RemotePath.cpp
  remoteFS/RemotePathAndStatus.cpp
Eric Cano's avatar
Eric Cano committed
96
  threading/ChildProcess.cpp
97
  threading/Daemon.cpp
Eric Cano's avatar
Eric Cano committed
98
  threading/Mutex.cpp
99
  threading/SocketPair.cpp
100
  threading/System.cpp
101
  threading/Threading.cpp
102
  utils/utils.cpp
103
104
105
106
107
  utils/strerror_r_wrapper.cpp
  CreationLog.cpp
  Configuration.cpp
  TapePool.cpp
  Timer.cpp
108
  UserIdentity.cpp
109
  VO.cpp)
Eric Cano's avatar
Eric Cano committed
110

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

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

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

137
138
add_library (ctacommonunittests SHARED
  ${COMMON_UNIT_TESTS_LIB_SRC_FILES})
139

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