forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
28 lines (23 loc) · 1 KB
/
CMakeLists.txt
File metadata and controls
28 lines (23 loc) · 1 KB
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
# SPDX-License-Identifier: BSD-3-Clause
# includes
target_include_directories(sof_public_headers INTERFACE ${PROJECT_SOURCE_DIR}/src/arch/host/include)
target_include_directories(sof_public_headers INTERFACE ${PROJECT_SOURCE_DIR}/src/platform/library/include)
include(CheckCCompilerFlag)
if (NOT CONFIG_SOF_ZEPHYR_STRICT_HEADERS)
target_include_directories(sof_public_headers INTERFACE
${PROJECT_SOURCE_DIR}/posix/include
)
endif()
# -Wimplicit-fallthrough is preferred, check if it's supported
check_c_compiler_flag(-Wimplicit-fallthrough supports_implicit_fallthrough)
if (supports_implicit_fallthrough)
set(implicit_fallthrough -Wimplicit-fallthrough)
endif()
# C & ASM flags
target_compile_options(sof_options INTERFACE -g -O3 -fPIC -DPIC -std=c99 -std=gnu99 -fgnu89-inline
-Wall -Werror -Wmissing-prototypes ${implicit_fallthrough} -Wno-pointer-to-int-cast
-Wno-int-to-pointer-cast -Wpointer-arith
-DCONFIG_LIBRARY "-imacros${CONFIG_H_PATH}")
if(NOT BUILD_UNIT_TESTS_HOST)
add_subdirectory(lib)
endif()