blob: 2f88b7cd21d3f34d6d1a86f86f45e31a518bd504 [file] [log] [blame]
André Draszikf69b19f2019-08-20 14:34:30 +01001cmake_minimum_required (VERSION 3.4)
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
Volodymyr Babchuk66905842019-01-21 16:26:35 +02007set (OPTEE_TEST_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
Jens Wiklandercb583fd2018-02-01 14:36:23 +01008################################################################################
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-noreturn -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)
24
25find_program(CCACHE_FOUND ccache)
26if(CCACHE_FOUND)
27 set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
28 set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
29endif(CCACHE_FOUND)
30
31add_subdirectory (ta)
32add_subdirectory (host/xtest)