Add security-server tests to security-tests-all.sh script.
[platform/core/test/security-tests.git] / CMakeLists.txt
1 # Copyright (c) 2012 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      Bartlomiej Grzelewski (b.grzelewski@samsung.com)
17 # @author      Pawel Polawski (p.polawski@partner.samsung.com)
18 # @brief
19 #
20
21 ############################# Check minimum CMake version #####################
22
23 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
24 PROJECT("security-tests")
25
26 ############################# cmake packages ##################################
27
28 INCLUDE(FindPkgConfig)
29
30 ############################# compilation defines #############################
31
32 # EMPTY
33
34 ############################# compiler flags ##################################
35
36 SET(CMAKE_C_FLAGS_PROFILING    "-O0 -g -pg")
37 SET(CMAKE_CXX_FLAGS_PROFILING  "-O0 -std=c++0x -g -pg")
38 SET(CMAKE_C_FLAGS_DEBUG        "-O0 -g")
39 SET(CMAKE_CXX_FLAGS_DEBUG      "-O0 -std=c++0x -g")
40 SET(CMAKE_C_FLAGS_RELEASE      "-O2 -g")
41 SET(CMAKE_CXX_FLAGS_RELEASE    "-O2 -std=c++0x -g")
42
43 #SET(SMACK_ENABLE ON)
44
45 OPTION(DPL_LOG "DPL logs status" ON)
46 IF(DPL_LOG)
47     MESSAGE(STATUS "Logging enabled for DPL")
48     ADD_DEFINITIONS("-DDPL_LOGS_ENABLED")
49 ELSE(DPL_LOG)
50     MESSAGE(STATUS "Logging disabled for DPL")
51 ENDIF(DPL_LOG)
52
53 # If supported for the target machine, emit position-independent code,suitable
54 # for dynamic linking and avoiding any limit on the size of the global offset
55 # table. This option makes a difference on the m68k, PowerPC and SPARC.
56 # (BJ: our ARM too?)
57 ADD_DEFINITIONS("-fPIC")
58
59 # Set the default ELF image symbol visibility to hidden - all symbols will be
60 # marked with this unless overridden within the code.
61 #ADD_DEFINITIONS("-fvisibility=hidden")
62
63 # Set compiler warning flags
64 #ADD_DEFINITIONS("-Werror")                      # Make all warnings into errors.
65 ADD_DEFINITIONS("-Wall")                        # Generate all warnings
66 ADD_DEFINITIONS("-Wextra")                      # Generate even more extra warnings
67 ADD_DEFINITIONS("-Wno-variadic-macros")         # Inhibit variadic macros warnings (needed for ORM)
68 ADD_DEFINITIONS("-Wno-deprecated")               # No warnings about deprecated features
69 ADD_DEFINITIONS("-std=c++0x")               # No warnings about deprecated features
70 STRING(REGEX MATCH "([^.]*)" API_VERSION "${VERSION}")
71 ADD_DEFINITIONS("-DAPI_VERSION=\"$(API_VERSION)\"")
72
73 IF(SMACK_ENABLE)
74     ADD_DEFINITIONS("-DWRT_SMACK_ENABLED")
75 ENDIF(SMACK_ENABLE)
76
77 ############################# Targets names ###################################
78
79 # No target defined so far
80
81 ############################# subdirectories ##################################
82
83 ADD_SUBDIRECTORY(tests)