From 90a87cf5e4dfcc0b02cbdb34130a3424a69c734c Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 10 Sep 2021 18:51:30 +0200 Subject: [PATCH] cmake: don't run crosstool-version-check for clang We will likely need to check clang version as well, eventually. However at the moment clang builds change too often for such check to be maintainable. Disable it for clang. --- components/esp_common/project_include.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/esp_common/project_include.cmake b/components/esp_common/project_include.cmake index 2199570434..e7b1d65448 100644 --- a/components/esp_common/project_include.cmake +++ b/components/esp_common/project_include.cmake @@ -1,8 +1,12 @@ # # Warn if the toolchain version doesn't match # -if(NOT ${target} STREQUAL "linux") +if(NOT (${target} STREQUAL "linux" OR CMAKE_C_COMPILER_ID MATCHES "Clang")) get_expected_ctng_version(expected_toolchain expected_gcc) gcc_version_check("${expected_gcc}") crosstool_version_check("${expected_toolchain}") endif() + +if(NOT ${target} STREQUAL "linux" AND CMAKE_C_COMPILER_ID MATCHES "Clang") + message(WARNING "Building ESP-IDF with clang is an experimental feature and is not yet officially supported.") +endif()