-
Notifications
You must be signed in to change notification settings - Fork 142
/
CMakeLists.txt
33 lines (28 loc) · 975 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
cmake_minimum_required (VERSION 3.2)
project (optee_examples C)
# https://cmake.org/Wiki/CMake_Useful_Variables
set (CMAKE_TOOLCHAIN_FILE CMakeToolchain.txt)
include(GNUInstallDirs)
add_compile_options (-Wall)
#add_compile_options (
# -Wall -Wbad-function-cast -Wcast-align
# -Werror-implicit-function-declaration -Wextra
# -Wfloat-equal -Wformat-nonliteral -Wformat-security
# -Wformat=2 -Winit-self -Wmissing-declarations
# -Wmissing-format-attribute -Wmissing-include-dirs
# -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs
# -Wpointer-arith -Wshadow -Wstrict-prototypes
# -Wswitch-default -Wunsafe-loop-optimizations
# -Wwrite-strings -Werror -fPIC
#)
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)
file(GLOB dirs *)
foreach(dir ${dirs})
if(EXISTS ${dir}/CMakeLists.txt)
add_subdirectory(${dir})
endif()
endforeach()