CMakeLists.txt 3.73 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
22
find_package (binutils REQUIRED)
find_package (libattr REQUIRED)
find_package (libcap REQUIRED)

23
set (COMMON_LIB_SRC_FILES
24
25
26
  dataStructures/AdminHost.cpp
  dataStructures/AdminUser.cpp
  dataStructures/ArchiveFile.cpp
27
  dataStructures/ArchiveFileSummary.cpp
28
29
30
31
32
  dataStructures/ArchiveJob.cpp
  dataStructures/ArchiveRequest.cpp
  dataStructures/ArchiveRoute.cpp
  dataStructures/CancelRetrieveRequest.cpp
  dataStructures/Dedication.cpp
33
  dataStructures/DedicationType.cpp
34
35
  dataStructures/DeleteArchiveRequest.cpp
  dataStructures/DRData.cpp
36
  dataStructures/DriveState.cpp
37
  dataStructures/DriveStatus.cpp
38
39
  dataStructures/EntryLog.cpp
  dataStructures/ListStorageClassRequest.cpp
40
  dataStructures/MountGroup.cpp
41
  dataStructures/MountType.cpp
42
  dataStructures/MountPolicy.cpp
43
44
  dataStructures/ReadTestResult.cpp
  dataStructures/RepackInfo.cpp
45
  dataStructures/RepackType.cpp
46
47
48
49
50
51
  dataStructures/RetrieveJob.cpp
  dataStructures/RetrieveRequest.cpp
  dataStructures/SecurityIdentity.cpp
  dataStructures/StorageClass.cpp
  dataStructures/Tape.cpp
  dataStructures/TapeFileLocation.cpp
52
  dataStructures/TapeLog.cpp
53
  dataStructures/TapePool.cpp
54
  dataStructures/TestSourceType.cpp
55
56
57
58
59
  dataStructures/UpdateFileInfoRequest.cpp
  dataStructures/User.cpp
  dataStructures/UserIdentity.cpp
  dataStructures/VerifyInfo.cpp
  dataStructures/WriteTestResult.cpp
60
  dataStructures/utils.cpp
61
62
63
64
65
  admin/AdminHost.cpp
  admin/AdminUser.cpp
  archiveRoutes/ArchiveRoute.cpp
  archiveNS/ArchiveDirEntry.cpp
  archiveNS/ArchiveDirIterator.cpp
66
  archiveNS/ArchiveFile.cpp
67
  archiveNS/ArchiveFileStatus.cpp
68
69
  archiveNS/StorageClass.cpp
  archiveNS/Tape.cpp
70
  archiveNS/TapeFileLocation.cpp
71
  checksum/Checksum.cpp
Eric Cano's avatar
Eric Cano committed
72
73
74
  exception/Backtrace.cpp
  exception/Errnum.cpp
  exception/Exception.cpp
75
76
77
78
79
80
81
  log/DummyLogger.cpp
  log/LogContext.cpp
  log/Logger.cpp
  log/Message.cpp
  log/Param.cpp
  log/StringLogger.cpp
  log/SyslogLogger.cpp
82
  log/StdoutLogger.cpp
83
84
85
  priorities/DriveQuota.cpp
  priorities/MountCriteria.cpp
  priorities/UserGroup.cpp
86
87
  processCap/ProcessCap.cpp
  processCap/SmartCap.cpp
88
89
90
  remoteFS/RemoteFileStatus.cpp
  remoteFS/RemotePath.cpp
  remoteFS/RemotePathAndStatus.cpp
Eric Cano's avatar
Eric Cano committed
91
  threading/ChildProcess.cpp
92
  threading/Daemon.cpp
Eric Cano's avatar
Eric Cano committed
93
  threading/Mutex.cpp
94
  threading/System.cpp
95
  threading/Threading.cpp
96
  utils/utils.cpp
97
98
99
100
101
102
  utils/strerror_r_wrapper.cpp
  CreationLog.cpp
  Configuration.cpp
  SecurityIdentity.cpp
  TapePool.cpp
  Timer.cpp
103
  UserIdentity.cpp
104
  VO.cpp)
Eric Cano's avatar
Eric Cano committed
105

106
107
add_library (ctacommon SHARED
  ${COMMON_LIB_SRC_FILES})
108
install (TARGETS ctacommon DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
Eric Cano's avatar
Eric Cano committed
109

110
target_link_libraries (ctacommon
111
  ctautils
Steven Murray's avatar
Steven Murray committed
112
  pthread
113
  uuid
114
  z
115
116
  Utils
  cap)
Eric Cano's avatar
Eric Cano committed
117

118
set (COMMON_UNIT_TESTS_LIB_SRC_FILES
119
  checksum/ChecksumTest.cpp
120
121
122
  log/LogContextTest.cpp
  log/ParamTest.cpp
  log/SyslogLoggerTest.cpp
123
  log/StringLoggerTest.cpp
124
  remoteFS/RemotePathTest.cpp
125
126
127
  threading/DaemonTest.cpp
  utils/UtilsTest.cpp
  UserIdentityTest.cpp)
Eric Cano's avatar
Eric Cano committed
128

129
130
add_library (ctacommonunittests SHARED
  ${COMMON_UNIT_TESTS_LIB_SRC_FILES})
131

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