mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
cmake: check mconf-idf binary version
Print a warning if an outdated version of mconf-idf is found in the PATH.
This commit is contained in:
parent
a7107d9bbd
commit
da8c09c463
@ -30,8 +30,28 @@ function(__kconfig_init)
|
|||||||
"on the PATH, or an MSYS2 version of gcc on the PATH to build mconf-idf. "
|
"on the PATH, or an MSYS2 version of gcc on the PATH to build mconf-idf. "
|
||||||
"Consult the setup docs for ESP-IDF on Windows.")
|
"Consult the setup docs for ESP-IDF on Windows.")
|
||||||
endif()
|
endif()
|
||||||
elseif(WINPTY)
|
else()
|
||||||
set(MCONF "\"${WINPTY}\" \"${MCONF}\"")
|
execute_process(COMMAND "${MCONF}" -v
|
||||||
|
RESULT_VARIABLE mconf_res
|
||||||
|
OUTPUT_VARIABLE mconf_out
|
||||||
|
ERROR_VARIABLE mconf_err)
|
||||||
|
if(${mconf_res})
|
||||||
|
message(WARNING "Failed to detect version of mconf-idf. Return code was ${mconf_res}.")
|
||||||
|
else()
|
||||||
|
string(STRIP "${mconf_out}" mconf_out)
|
||||||
|
set(mconf_expected_ver "mconf-v4.6.0.0-idf-20190628-win32")
|
||||||
|
if(NOT ${mconf_out} STREQUAL "mconf-idf version ${mconf_expected_ver}")
|
||||||
|
message(WARNING "Unexpected ${mconf_out}. Expected ${mconf_expected_ver}. "
|
||||||
|
"Please check the ESP-IDF Getting Started guide for version "
|
||||||
|
"${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}.${IDF_VERSION_PATCH} "
|
||||||
|
"to correct this issue")
|
||||||
|
else()
|
||||||
|
message(STATUS "${mconf_out}") # prints: mconf-idf version ....
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(WINPTY)
|
||||||
|
set(MCONF "\"${WINPTY}\" \"${MCONF}\"")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user