Skip to content

Commit 06c4701

Browse files
committed
CMake 3.6.0 compatibility
1 parent 3ea569a commit 06c4701

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

cmake/toolchain.ESP8266.cmake

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
include(CMakeForceCompiler)
2-
31
set(CMAKE_SYSTEM_NAME ESP8266)
42
set(CMAKE_SYSTEM_VERSION 1)
53

@@ -39,10 +37,9 @@ list(GET ESP8266_ESPTOOLS 0 ESP8266_ESPTOOL)
3937

4038
message("Using " ${ESP8266_XTENSA_C_COMPILER} " C compiler.")
4139
message("Using " ${ESP8266_XTENSA_CXX_COMPILER} " C++ compiler.")
42-
message("Using " ${ESP8266_ESPTOOL} " esptool binary.")
4340

44-
CMAKE_FORCE_C_COMPILER(${ESP8266_XTENSA_C_COMPILER} GNU_C)
45-
CMAKE_FORCE_CXX_COMPILER(${ESP8266_XTENSA_CXX_COMPILER} GNU_CXX)
41+
set(CMAKE_C_COMPILER ${ESP8266_XTENSA_C_COMPILER})
42+
set(CMAKE_CXX_COMPILER ${ESP8266_XTENSA_CXX_COMPILER})
4643

4744
set(CMAKE_C_FLAGS "-Os -g -std=gnu99 -Wpointer-arith -Wno-implicit-function-declaration -Wundef -pipe -D__ets__ -DICACHE_FLASH -fno-inline-functions -ffunction-sections -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -fdata-sections" CACHE STRING "C compiler flags")
4845
set(CMAKE_CXX_FLAGS "-Os -g -D__ets__ -DICACHE_FLASH -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections" CACHE STRING "CXX compiler flags")

0 commit comments

Comments
 (0)