Standard way to require a specific IDF version?
Posted: Fri Sep 25, 2020 6:36 am
Is there anything provided by ESP-IDF (v4.1) that can be used to verify that a specific version of the IDF is being used, and abort if it's not available?
For example, I'd like my CMakeLists.txt to signal to a user that they have to use v4.1 and anything else is unsupported.
Obviously I can do this:
However this gets a bit cumbersome when I want to extend it to support a number of different versions, perhaps including ranges or excluding specific versions: E.g. v3.2 - v3.3, not v4.0, and v4.1 only.
For example, I'd like my CMakeLists.txt to signal to a user that they have to use v4.1 and anything else is unsupported.
Obviously I can do this:
Code: Select all
if (NOT (IDF_VERSION_MAJOR EQUAL 4 AND IDF_VERSION_MINOR EQUAL 1))
message(FATAL_ERROR "ESP-IDF v4.1 is required")
endif()