Add storage serializer (Cynara::StorageSerializer)
[platform/core/security/cynara.git] / test / CMakeLists.txt
1 # Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
2 #
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
6 #
7 #        http://www.apache.org/licenses/LICENSE-2.0
8 #
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.
14 #
15 # @file        CMakeLists.txt
16 # @author      Aleksander Zdyb <a.zdyb@partner.samsung.com>
17 # @brief       Temporary cmake for tests
18 #
19
20 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
21 PROJECT("cynara-tests")
22
23 ADD_SUBDIRECTORY(${GMOCK_DIR} gmock)
24
25 SET(CYNARA_SOURCES_FOR_TESTS
26     ${CYNARA_SRC}/service/storage/Storage.cpp
27     ${CYNARA_SRC}/common/types/PolicyBucket.cpp
28     ${CYNARA_SRC}/service/storage/InMemoryStorageBackend.cpp
29     ${CYNARA_SRC}/service/storage/StorageSerializer.cpp
30     ${CYNARA_SRC}/common/types/PolicyKey.cpp
31 )
32
33 SET(CYNARA_TESTS_SOURCES
34     types/policykey.cpp
35     storage/storage/policies.cpp
36     storage/storage/check.cpp
37     storage/storage/buckets.cpp
38     storage/inmemorystoragebackend/inmemorystoragebackend.cpp
39     storage/inmemorystoragebackend/search.cpp
40     storage/inmemorystoragebackend/buckets.cpp
41     storage/serializer/dump.cpp
42     helpers.cpp
43 )
44
45 INCLUDE_DIRECTORIES(
46     ${GMOCK_DIR}/include
47     ${GMOCK_DIR}/gtest/include
48     ${CYNARA_SRC}
49     ${CYNARA_SRC}/common
50     ${CYNARA_SRC}/include
51 )
52
53 ADD_EXECUTABLE(cynara-tests
54     ${CYNARA_SOURCES_FOR_TESTS}
55     ${CYNARA_TESTS_SOURCES}
56 )
57
58 SET(CMAKE_CXX_FLAGS "-std=c++0x -O0 -g -gdwarf-2")
59
60 FIND_PACKAGE(Threads)
61
62 TARGET_LINK_LIBRARIES(cynara-tests
63     ${CMAKE_THREAD_LIBS_INIT}
64     gmock gtest_main
65 )