1 # Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # @file CMakeLists.txt
16 # @author Aleksander Zdyb <a.zdyb@partner.samsung.com>
17 # @brief Cmake for tests
20 PKG_CHECK_MODULES(PKGS REQUIRED gmock_main)
22 SET(CYNARA_SRC ${PROJECT_SOURCE_DIR}/src)
24 SET(CYNARA_SOURCES_FOR_TESTS
25 ${CYNARA_SRC}/service/storage/Storage.cpp
26 ${CYNARA_SRC}/common/types/PolicyBucket.cpp
27 ${CYNARA_SRC}/service/storage/InMemoryStorageBackend.cpp
28 ${CYNARA_SRC}/service/storage/BucketDeserializer.cpp
29 ${CYNARA_SRC}/service/storage/StorageDeserializer.cpp
30 ${CYNARA_SRC}/service/storage/StorageSerializer.cpp
31 ${CYNARA_SRC}/common/types/PolicyKey.cpp
32 ${CYNARA_SRC}/common/types/PolicyType.cpp
35 SET(CYNARA_TESTS_SOURCES
36 common/exceptions/bucketrecordcorrupted.cpp
38 storage/storage/policies.cpp
39 storage/storage/check.cpp
40 storage/storage/buckets.cpp
41 storage/inmemorystoragebackend/inmemorystoragebackend.cpp
42 storage/inmemorystoragebackend/search.cpp
43 storage/inmemorystoragebackend/buckets.cpp
44 storage/serializer/bucket_load.cpp
45 storage/serializer/deserialize.cpp
46 storage/serializer/dump.cpp
47 common/types/policybucket.cpp
58 ADD_EXECUTABLE(${TARGET_CYNARA_TESTS}
59 ${CYNARA_SOURCES_FOR_TESTS}
60 ${CYNARA_TESTS_SOURCES}
63 TARGET_LINK_LIBRARIES(${TARGET_CYNARA_TESTS}
64 ${PKGS_LDFLAGS} ${PKGS_LIBRARIES}
66 INSTALL(TARGETS ${TARGET_CYNARA_TESTS} DESTINATION bin)