Skip to content

Commit 40c1556

Browse files
Ramakrishna PallalaAnas Nashif
authored andcommitted
ext: hal: altera: disable altera_avalon_i2c compilation warnings
Disable compilation warnings for altera_avalon_i2c.c as it is not maintained in Zephyr. Cmake does not allow us to use set_source_files_properties on source files directly, these files need to be linked to either a target executable or a target library. Due to the above reason, altera_avalon_i2c CMakeLists.txt creates a library and links the source file to the zephyr library. Signed-off-by: Ramakrishna Pallala <[email protected]>
1 parent 55662a7 commit 40c1556

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
zephyr_sources(altera_avalon_i2c.c)
1+
zephyr_library()
2+
zephyr_library_compile_definitions(${COMPILER})
3+
zephyr_library_sources(altera_avalon_i2c.c)
4+
set_source_files_properties(altera_avalon_i2c.c
5+
PROPERTIES COMPILE_DEFINITIONS "${COMPILER}")
6+
set_source_files_properties(altera_avalon_i2c.c
7+
PROPERTIES COMPILE_FLAGS -Wno-maybe-uninitialized) # altera_avalon_i2c.c warns on uninitialized

0 commit comments

Comments
 (0)