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

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

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

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

132
133
add_library (ctacommonunittests SHARED
  ${COMMON_UNIT_TESTS_LIB_SRC_FILES})
134

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