1cmake_minimum_required (VERSION 3.4)
2project (optee_test C)
3
4# Default cross compile settings
5set (CMAKE_TOOLCHAIN_FILE CMakeToolchain.txt)
6
7set (OPTEE_TEST_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
8################################################################################
9# Compiler flags:
10#   We want to use the same flags in the entire optee_client git
11################################################################################
12add_compile_options (
13	-Wall -Wbad-function-cast -Wcast-align
14	-Werror-implicit-function-declaration -Wextra
15	-Wfloat-equal -Wformat-nonliteral -Wformat-security
16	-Wformat=2 -Winit-self -Wmissing-declarations
17	-Wmissing-format-attribute -Wmissing-include-dirs
18	-Wmissing-prototypes -Wnested-externs
19	-Wpointer-arith -Wshadow -Wstrict-prototypes
20	-Wswitch-default -Wunsafe-loop-optimizations
21	-Wwrite-strings -Werror -fPIC
22 	-Wno-missing-field-initializers
23	-Wno-unused-parameter
24)
25
26find_program(CCACHE_FOUND ccache)
27if(CCACHE_FOUND)
28	set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
29	set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
30endif(CCACHE_FOUND)
31
32add_subdirectory (ta)
33add_subdirectory (host/xtest)
34add_subdirectory (host/supp_plugin)
35