From: Angus Gratton Date: Wed, 28 Nov 2018 23:52:23 +0000 (+1100) Subject: cmake: Fail CMake if expand_requirements.cmake fails X-Git-Tag: v3.3-beta2~132^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4782aafc4cdbf1d800bef80ce3730f0ff2d53455;p=esp-idf cmake: Fail CMake if expand_requirements.cmake fails --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 362c68984e..2c6ef7621f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,13 @@ execute_process(COMMAND "${CMAKE_COMMAND}" -D "IDF_PATH=${IDF_PATH}" -D "DEBUG=${DEBUG}" -P "${IDF_PATH}/tools/cmake/scripts/expand_requirements.cmake" - WORKING_DIRECTORY "${PROJECT_PATH}") + WORKING_DIRECTORY "${PROJECT_PATH}" + RESULT_VARIABLE expand_requirements_result) + +if(expand_requirements_result) + message(FATAL_ERROR "Failed to expand component requirements") +endif() + include("${CMAKE_BINARY_DIR}/component_depends.cmake") #