Update to C99 standard to match SOF. Silenced warning generated by newest GCC compiler related to int cast of char typed values that may result in negative values. Syntax fix in linkage of crypto library to more generic approach.

This commit is contained in:
Andrey Borisovich 2022-01-20 15:24:06 +01:00 committed by Liam Girdwood
parent ce69d7bad8
commit ecb6a66932
1 changed files with 7 additions and 1 deletions

View File

@ -24,11 +24,17 @@ add_executable(rimage
tomlc99/toml.c tomlc99/toml.c
) )
set_property(TARGET rimage PROPERTY C_STANDARD 99)
target_compile_options(rimage PRIVATE target_compile_options(rimage PRIVATE
-Wall -Werror -Wmissing-prototypes -Wimplicit-fallthrough -Wall -Werror -Wmissing-prototypes -Wimplicit-fallthrough
) )
target_link_libraries(rimage PRIVATE "-lcrypto") if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 9.1)
target_compile_options(rimage PRIVATE -Wno-char-subscripts)
endif()
target_link_libraries(rimage PRIVATE crypto)
target_include_directories(rimage PRIVATE target_include_directories(rimage PRIVATE
src/include/ src/include/