André Draszik | f69b19f | 2019-08-20 14:34:30 +0100 | [diff] [blame] | 1 | cmake_minimum_required (VERSION 3.4) |
Etienne Carriere | 78aa0ff | 2018-11-09 18:42:49 +0100 | [diff] [blame] | 2 | project (optee_test C) |
Jens Wiklander | cb583fd | 2018-02-01 14:36:23 +0100 | [diff] [blame] | 3 | |
| 4 | # Default cross compile settings |
| 5 | set (CMAKE_TOOLCHAIN_FILE CMakeToolchain.txt) |
| 6 | |
Volodymyr Babchuk | 6690584 | 2019-01-21 16:26:35 +0200 | [diff] [blame] | 7 | set (OPTEE_TEST_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) |
Jens Wiklander | cb583fd | 2018-02-01 14:36:23 +0100 | [diff] [blame] | 8 | ################################################################################ |
| 9 | # Compiler flags: |
| 10 | # We want to use the same flags in the entire optee_client git |
| 11 | ################################################################################ |
| 12 | add_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 | |
| 25 | find_program(CCACHE_FOUND ccache) |
| 26 | if(CCACHE_FOUND) |
| 27 | set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) |
| 28 | set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) |
| 29 | endif(CCACHE_FOUND) |
| 30 | |
| 31 | add_subdirectory (ta) |
| 32 | add_subdirectory (host/xtest) |