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