1idf_component_register(SRCS "esp_spiffs.c"
2                            "spiffs_api.c"
3                            "spiffs/src/spiffs_cache.c"
4                            "spiffs/src/spiffs_check.c"
5                            "spiffs/src/spiffs_gc.c"
6                            "spiffs/src/spiffs_hydrogen.c"
7                            "spiffs/src/spiffs_nucleus.c"
8                    INCLUDE_DIRS "include"
9                    PRIV_INCLUDE_DIRS "." "spiffs/src"
10                    REQUIRES spi_flash
11                    PRIV_REQUIRES bootloader_support esptool_py)
12
13if(CMAKE_C_COMPILER_ID MATCHES "GNU")
14    set_source_files_properties(spiffs/src/spiffs_nucleus.c PROPERTIES COMPILE_FLAGS -Wno-stringop-truncation)
15endif()
16