mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
feat(cmakev2/idf): add __init_idf_version to set IDF_VER
Initialize the IDF_VER build property using the version.txt file, or use git-describe. If neither is available, fall back to the value of the IDF_VERSION environment variable. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
@@ -58,7 +58,7 @@ function(test_component_priority)
|
||||
__dump_component_properties("${component_name}")
|
||||
endfunction()
|
||||
|
||||
# Test that IDF_VERSION is set
|
||||
# Test that IDF_VERSION and IDF_VER build property is set
|
||||
function(test_idf_version)
|
||||
if(NOT DEFINED IDF_VERSION_MAJOR OR
|
||||
NOT DEFINED IDF_VERSION_MINOR OR
|
||||
@@ -66,6 +66,10 @@ function(test_idf_version)
|
||||
NOT DEFINED ENV{IDF_VERSION})
|
||||
idf_die("IDF_VERSION not set")
|
||||
endif()
|
||||
idf_build_get_property(idf_ver IDF_VER)
|
||||
if(NOT idf_ver)
|
||||
idf_die("IDF_VER build property not set")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Test that Python interpreter is set
|
||||
|
||||
Reference in New Issue
Block a user