blob: a3fd269b276ec84731bb2b262b9743e367aeb18c [file] [log] [blame]
Jens Wiklandercb583fd2018-02-01 14:36:23 +01001cmake_minimum_required (VERSION 3.2)
Etienne Carriere78aa0ff2018-11-09 18:42:49 +01002project (optee_test C)
Jens Wiklandercb583fd2018-02-01 14:36:23 +01003
4# Default cross compile settings
5set (CMAKE_TOOLCHAIN_FILE CMakeToolchain.txt)
6
7################################################################################
8# Compiler flags:
9# We want to use the same flags in the entire optee_client git
10################################################################################
11add_compile_options (
12 -Wall -Wbad-function-cast -Wcast-align
13 -Werror-implicit-function-declaration -Wextra
14 -Wfloat-equal -Wformat-nonliteral -Wformat-security
15 -Wformat=2 -Winit-self -Wmissing-declarations
16 -Wmissing-format-attribute -Wmissing-include-dirs
17 -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs
18 -Wpointer-arith -Wshadow -Wstrict-prototypes
19 -Wswitch-default -Wunsafe-loop-optimizations
20 -Wwrite-strings -Werror -fPIC
21 -Wno-missing-field-initializers
22)
23
24find_program(CCACHE_FOUND ccache)
25if(CCACHE_FOUND)
26 set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
27 set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
28endif(CCACHE_FOUND)
29
30add_subdirectory (ta)
31add_subdirectory (host/xtest)