CMakeLists.txt 3.93 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
37
  dataStructures/DeleteArchiveRequest.cpp
  dataStructures/DRData.cpp
38
  dataStructures/DriveState.cpp
39
  dataStructures/DriveStatus.cpp
40
41
  dataStructures/EntryLog.cpp
  dataStructures/ListStorageClassRequest.cpp
42
  dataStructures/LogicalLibrary.cpp
43
  dataStructures/MountType.cpp
44
  dataStructures/MountPolicy.cpp
45
46
  dataStructures/ReadTestResult.cpp
  dataStructures/RepackInfo.cpp
47
  dataStructures/RepackType.cpp
48
  dataStructures/Requester.cpp
49
  dataStructures/RetrieveFileQueueCriteria.cpp
50
51
52
53
54
  dataStructures/RetrieveJob.cpp
  dataStructures/RetrieveRequest.cpp
  dataStructures/SecurityIdentity.cpp
  dataStructures/StorageClass.cpp
  dataStructures/Tape.cpp
55
  dataStructures/TapeFile.cpp
56
  dataStructures/TapeLog.cpp
57
  dataStructures/TapePool.cpp
58
  dataStructures/TestSourceType.cpp
59
  dataStructures/UpdateFileInfoRequest.cpp
60
  dataStructures/UpdateFileStorageClassRequest.cpp
61
62
63
  dataStructures/UserIdentity.cpp
  dataStructures/VerifyInfo.cpp
  dataStructures/WriteTestResult.cpp
64
  dataStructures/utils.cpp
65
66
67
  admin/AdminHost.cpp
  admin/AdminUser.cpp
  archiveRoutes/ArchiveRoute.cpp
68
  archiveNS/ArchiveFile.cpp
69
  archiveNS/ArchiveFileStatus.cpp
70
71
  archiveNS/StorageClass.cpp
  archiveNS/Tape.cpp
72
  archiveNS/TapeFileLocation.cpp
73
  checksum/Checksum.cpp
Eric Cano's avatar
Eric Cano committed
74
75
76
  exception/Backtrace.cpp
  exception/Errnum.cpp
  exception/Exception.cpp
77
78
79
80
81
82
83
  log/DummyLogger.cpp
  log/LogContext.cpp
  log/Logger.cpp
  log/Message.cpp
  log/Param.cpp
  log/StringLogger.cpp
  log/SyslogLogger.cpp
84
  log/StdoutLogger.cpp
85
86
87
  priorities/DriveQuota.cpp
  priorities/MountCriteria.cpp
  priorities/UserGroup.cpp
88
89
  processCap/ProcessCap.cpp
  processCap/SmartCap.cpp
90
91
92
  remoteFS/RemoteFileStatus.cpp
  remoteFS/RemotePath.cpp
  remoteFS/RemotePathAndStatus.cpp
Eric Cano's avatar
Eric Cano committed
93
  threading/ChildProcess.cpp
94
  threading/Daemon.cpp
Eric Cano's avatar
Eric Cano committed
95
  threading/Mutex.cpp
96
  threading/SocketPair.cpp
97
  threading/System.cpp
98
  threading/Threading.cpp
99
  utils/utils.cpp
100
101
102
103
104
105
  utils/strerror_r_wrapper.cpp
  CreationLog.cpp
  Configuration.cpp
  SecurityIdentity.cpp
  TapePool.cpp
  Timer.cpp
106
  UserIdentity.cpp
107
  VO.cpp)
Eric Cano's avatar
Eric Cano committed
108

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

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

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

134
135
add_library (ctacommonunittests SHARED
  ${COMMON_UNIT_TESTS_LIB_SRC_FILES})
136

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