Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax error in cmake code at when parsing string Invalid escape sequence \d #32

Open
ShaunLeMouton opened this issue Aug 19, 2020 · 2 comments

Comments

@ShaunLeMouton
Copy link

I used the 4.0 esp idf with python 3.8 at windows 10 with visual studio code:

`Make Error at C:/dev/ESP32/esp-idf/esp-idf/tools/cmake/component.cmake:222 (message):
CMake Warning (dev) at build_properties.temp.cmake:2 (set):

Syntax error in cmake code at



  C:/dev/ESP32/esphttpd-freertos/build/bootloader/build_properties.temp.cmake:2



when parsing string



  c:\dev\ESP32\tools\python_env\idf4.0_py3.8_env\Scripts\python.exe



Invalid escape sequence \d



Policy CMP0010 is not set: Bad variable reference syntax is an error.  Run
"cmake --help-policy CMP0010" for policy details.  Use the cmake_policy
command to set the policy and suppress this warning.

Call Stack (most recent call first):

C:/dev/ESP32/esp-idf/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:1 (include)

This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at
C:/dev/ESP32/tools/tools/cmake/3.13.4/share/cmake-3.13/Modules/CheckCSourceCompiles.cmake:98
(try_compile):

try_compile command is not scriptable

Call Stack (most recent call first):

C:/dev/ESP32/tools/tools/cmake/3.13.4/share/cmake-3.13/Modules/CheckCCompilerFlag.cmake:50 (CHECK_C_SOURCE_COMPILES)
C:/dev/ESP32/esp-idf/esp-idf/components/libesphttpd/CMakeLists.txt:8 (check_c_compiler_flag)
C:/dev/ESP32/esp-idf/esp-idf/components/libesphttpd/CMakeLists.txt:15 (enable_c_compiler_flag_if_supported)
C:/dev/ESP32/esp-idf/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:60 (include)
C:/dev/ESP32/esp-idf/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:76 (__component_get_requirements)

Call Stack (most recent call first):
C:/dev/ESP32/esp-idf/esp-idf/tools/cmake/build.cmake:404 (__component_get_requirements)
C:/dev/ESP32/esp-idf/esp-idf/tools/cmake/project.cmake:348 (idf_build_process)
CMakeLists.txt:27 (project)

-- Configuring incomplete, errors occurred!
See also "C:/dev/ESP32/esphttpd-freertos/build/bootloader/CMakeFiles/CMakeOutput.log".
[76/274] Building C object esp-idf/newlib/CMakeFiles/__idf_newlib.dir/time.c.obj
ninja: build stopped: subcommand failed.

@phatpaul
Copy link
Collaborator

Sorry for the lack of support. I have been putting-off my upgrade to IDF 4 since I'm happily working on 3.3 on Windows. Have you resolved it? If so please provide PR.

@georgik
Copy link

georgik commented Feb 10, 2021

This problem occurs on Windows when CMakeLists.txt contains environment variable expansion like this:

include("$ENV{IDF_PATH}/tools/cmake/project.cmake")

CMake is complaining about the first backlash in the path:

c:\dev\ESP32\tools\python_env\idf4.0_py3.8_env\Scripts\python.exe

CMake suggests using file(TO_CMAKE_PATH "<path>" <variable>): https://cmake.org/cmake/help/latest/command/file.html#to-cmake-path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants