Skip to content

Commit 81f244f

Browse files
committed
ESP8266 build opt fix from pull technyon#14
1 parent 0431756 commit 81f244f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Arduino-toolchain.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
9494
# Workaround for CMAKE_TRY_COMPILE_TARGET_TYPE. For later ESP32 cores this file is missing
9595
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/build_opt.h" "")
9696

97+
# ESP8266 build.opt fix
98+
if (NOT EXISTS "${CMAKE_BINARY_DIR}/core/build.opt")
99+
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/core)
100+
file(TOUCH ${CMAKE_BINARY_DIR}/core/build.opt)
101+
endif()
102+
97103
# Do not try to link during the configure time, due to the dependency on the
98104
# core, which we do not have a target yet.
99105
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)

0 commit comments

Comments
 (0)