CMakeLists.txt 3.97 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
  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
  dataStructures/Requester.cpp
50
  dataStructures/RetrieveFileQueueCriteria.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
  archiveNS/ArchiveFile.cpp
70
  archiveNS/ArchiveFileStatus.cpp
71
72
  archiveNS/StorageClass.cpp
  archiveNS/Tape.cpp
73
  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
79
80
81
82
83
84
  log/DummyLogger.cpp
  log/LogContext.cpp
  log/Logger.cpp
  log/Message.cpp
  log/Param.cpp
  log/StringLogger.cpp
  log/SyslogLogger.cpp
85
  log/StdoutLogger.cpp
86
87
88
  priorities/DriveQuota.cpp
  priorities/MountCriteria.cpp
  priorities/UserGroup.cpp
89
90
  processCap/ProcessCap.cpp
  processCap/SmartCap.cpp
91
92
93
  remoteFS/RemoteFileStatus.cpp
  remoteFS/RemotePath.cpp
  remoteFS/RemotePathAndStatus.cpp
Eric Cano's avatar
Eric Cano committed
94
  threading/ChildProcess.cpp
95
  threading/Daemon.cpp
Eric Cano's avatar
Eric Cano committed
96
  threading/Mutex.cpp
97
  threading/SocketPair.cpp
98
  threading/System.cpp
99
  threading/Threading.cpp
100
  utils/utils.cpp
101
102
103
104
105
106
  utils/strerror_r_wrapper.cpp
  CreationLog.cpp
  Configuration.cpp
  SecurityIdentity.cpp
  TapePool.cpp
  Timer.cpp
107
  UserIdentity.cpp
108
  VO.cpp)
Eric Cano's avatar
Eric Cano committed
109

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

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

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

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

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