tools: ctl: CMakeLists: Add -Wall and -Werror flags

These flags are required to prevent unwanted bugs in the ctl tool. They
have been used to detect an undefined behaviour instance which occurred
due to lack of a return value in a non-void function.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
This commit is contained in:
Paul Olaru 2021-11-09 15:49:54 +02:00 committed by Daniel Baluta
parent e3ac593f86
commit 6cc5ba98ed
1 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,10 @@ target_link_libraries(sof-ctl PRIVATE
"-lasound"
)
target_compile_options(sof-ctl PRIVATE
-Wall -Werror
)
target_include_directories(sof-ctl PRIVATE
"${SOF_ROOT_SOURCE_DIRECTORY}/src/include"
"${SOF_ROOT_SOURCE_DIRECTORY}"