Jens Wiklander | cb583fd | 2018-02-01 14:36:23 +0100 | [diff] [blame] | 1 | cmake_minimum_required (VERSION 3.2) |
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 | |
| 7 | ################################################################################ |
| 8 | # Compiler flags: |
| 9 | # We want to use the same flags in the entire optee_client git |
| 10 | ################################################################################ |
| 11 | add_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 | |
| 24 | find_program(CCACHE_FOUND ccache) |
| 25 | if(CCACHE_FOUND) |
| 26 | set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) |
| 27 | set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) |
| 28 | endif(CCACHE_FOUND) |
| 29 | |
| 30 | add_subdirectory (ta) |
| 31 | add_subdirectory (host/xtest) |