Jens Wiklander | cb583fd | 2018-02-01 14:36:23 +0100 | [diff] [blame^] | 1 | cmake_minimum_required (VERSION 3.2) |
| 2 | |
| 3 | # Default cross compile settings |
| 4 | set (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 | ################################################################################ |
| 10 | add_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 | |
| 23 | find_program(CCACHE_FOUND ccache) |
| 24 | if(CCACHE_FOUND) |
| 25 | set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) |
| 26 | set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) |
| 27 | endif(CCACHE_FOUND) |
| 28 | |
| 29 | add_subdirectory (ta) |
| 30 | add_subdirectory (host/xtest) |