CMakeLists.txt 2.95 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#                      CMakeLists.txt
#
# This file is part of the Castor project.
# See http://castor.web.cern.ch/castor
#
# Copyright (C) 2003  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 2
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#
# Eric.Cano@cern.ch
#

cmake_minimum_required (VERSION 2.6)

25
26
# Those tests are single threaded, functionnal and error tests. They could
# actually fail in helgrind/drd (but memcheck is recommended)
27
28
add_executable(castorUnitTests
  castorUnitTests.cpp
29
  ../castor/exception/ExceptionTest.cpp
30
  ../castor/log/LoggerImplementationTest.cpp
31
  ../castor/log/ParamTest.cpp
32
  ../castor/server/DaemonTest.cpp
33
34
  ../castor/tape/tapeserver/SCSI/DeviceTest.cpp
  ../castor/tape/tapeserver/SCSI/StructuresTest.cpp
35
36
37
38
39
  ../castor/tape/tapeserver/utils/RegexTest.cpp
  ../castor/tape/tapeserver/drive/DriveTest.cpp
  ../castor/tape/tapeserver/exception/ExceptionTest.cpp
  ../castor/tape/tapeserver/file/StructuresTest.cpp
  ../castor/tape/tapeserver/threading/ThreadingTests.cpp
Steven Murray's avatar
Steven Murray committed
40
  ../castor/utils/UtilsTest.cpp
41
42
43
44
45
)
set_property(SOURCE ../SCSI/StructuresTest.cpp
  PROPERTY COMPILE_FLAGS -fno-strict-aliasing
)
target_link_libraries(castorUnitTests TapeDrive Exception SCSI System Utils File 
46
  castorTapeServerThreading ${GTEST_LIBRARY} gmock pthread castorcommon castorclient)
47
48
49
50
51
52

# Those tests are multi threaded. They could should also be run in 
# helgrind/drd (and also memcheck)
add_executable(castorThreadedUnitTests
  castorUnitTests.cpp
  ../castor/tape/tapeserver/threading/ThreadingMTTests.cpp
53
  ../castor/tape/tapeserver/daemon/tapeserverdTest.cpp
54
55
)
target_link_libraries(castorThreadedUnitTests TapeDrive Exception SCSI System 
56
57
58
59
  Utils File castorTapeServerThreading tapeserverdTest tapeserver 
  castortapegatewayprotocol castortapenet castortapeutils
  ${GTEST_LIBRARY} gmock pthread castorcommon castorclient castorvdqm
  castorvmgr castorrfio)
60

61
62
63
64
65
66
67
68
# Those tests are multi threaded. They could should also be run in 
# helgrind/drd (but not memcheck)
add_executable(castorMultiprocessUnitTests
  castorUnitTests.cpp
  ../castor/tape/tapeserver/threading/ThreadingMPTests.cpp
)
target_link_libraries(castorMultiprocessUnitTests TapeDrive Exception SCSI System 
  Utils File castorTapeServerThreading 
69
  ${GTEST_LIBRARY} gmock pthread castorcommon castorclient)
70
71

install(TARGETS castorUnitTests castorThreadedUnitTests castorMultiprocessUnitTests
72
  DESTINATION ${CASTOR_DEST_BIN_DIR})