From 370473b772ea4283d0100c831e3d72f2f4d7f787 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 10 Sep 2021 19:23:12 +0200 Subject: [PATCH] spiffs: only add GCC-specific flags when building with GCC --- components/spiffs/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/spiffs/CMakeLists.txt b/components/spiffs/CMakeLists.txt index 9a9d35f5b0..5954094c43 100644 --- a/components/spiffs/CMakeLists.txt +++ b/components/spiffs/CMakeLists.txt @@ -10,4 +10,6 @@ idf_component_register(SRCS "esp_spiffs.c" REQUIRES spi_flash PRIV_REQUIRES bootloader_support esptool_py) -set_source_files_properties(spiffs/src/spiffs_nucleus.c PROPERTIES COMPILE_FLAGS -Wno-stringop-truncation) +if(CMAKE_C_COMPILER_ID MATCHES "GNU") + set_source_files_properties(spiffs/src/spiffs_nucleus.c PROPERTIES COMPILE_FLAGS -Wno-stringop-truncation) +endif()