From 6d2debe1fde1727334f93b5700ccab286c904880 Mon Sep 17 00:00:00 2001 From: Toby Chaloner Date: Sun, 14 Jul 2024 21:55:22 +0100 Subject: [PATCH] ESP8266 build.opt missing fix --- Arduino-toolchain.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Arduino-toolchain.cmake b/Arduino-toolchain.cmake index 74a3de0..7c2b557 100644 --- a/Arduino-toolchain.cmake +++ b/Arduino-toolchain.cmake @@ -94,6 +94,11 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Workaround for CMAKE_TRY_COMPILE_TARGET_TYPE. For later ESP32 cores this file is missing file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/build_opt.h" "") +if (NOT EXISTS "${CMAKE_BINARY_DIR}/core/build.opt") + file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/core) + file(TOUCH ${CMAKE_BINARY_DIR}/core/build.opt) +endif() + # Do not try to link during the configure time, due to the dependency on the # core, which we do not have a target yet. set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)