espressif / esp-iot-bridge

A smart bridge to make both ESP and the other MCU or smart device can access the Internet.
Apache License 2.0
140 stars 49 forks source link

Fix: CMakeLists Grammar errors that may occur during the construction… (AEGHB-490) #61

Closed Kreedb closed 4 months ago

Kreedb commented 5 months ago

Fix: CMakeLists Grammar errors that may occur during the construction…

xcguang commented 5 months ago

@Kreedb Hello, how can I reproduce the error before this commit please? On some PC OSes or CMake versions?

Kreedb commented 5 months ago

image in version 6.1.11,with esp-idf and arduino image In actual construction, it may be interpreted as incorrect macro definitions

xcguang commented 5 months ago

Can you try "-DFALLBACK_DNS_SERVER_ADDRESS(p)=ipaddr_aton(\"8.8.8.8\",(p))"?

I didn‘t coding on Arduino, I'm not sure if it can work.

Kreedb commented 5 months ago

Yes, I have tried many ways for example:

-DFALLBACK_DNS_SERVER_ADDRESS(p)=ipaddr_aton("8.8.8.8",(p))

and

set(FALLBACK_DNS_SERVER "8.8.8.8")
set(FALLBACK_DNS_SERVER_ADDRESS "ipaddr_aton(\"${FALLBACK_DNS_SERVER}\",(p))")
string(REPLACE "\"" "\\\"" ESCAPED_FALLBACK_DNS_SERVER_ADDRESS ${FALLBACK_DNS_SERVER_ADDRESS})
target_compile_definitions(__idf_lwip PRIVATE IP_PORTMAP_MAX=255 FALLBACK_DNS_SERVER_ADDRESS=${ESCAPED_FALLBACK_DNS_SERVER_ADDRESS})

image