Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-30326

On Windows Conan auto setup step failed with...

    XMLWordPrintable

Details

    • Windows
    • 0d40cc509 (13.0)

    Description

      On Windows simple CMake project with Conan failed to configure with errors like:

       

      [cmake] CMake Error at C:/Work/Tmp/build-cmake-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug/conan-dependencies/conan_paths.cmake:2 (list):
      [cmake]   Syntax error in cmake code at
      [cmake] 
      [cmake]     C:/Work/Tmp/build-cmake-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug/conan-dependencies/conan_paths.cmake:2
      [cmake] 
      [cmake]   when parsing string
      [cmake] 
      [cmake]     C:\Work\Tmp\build-cmake-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug\conan-dependencies\build\conan
      [cmake] 
      [cmake]   Invalid character escape '\W'.
      [cmake] Call Stack (most recent call first):
      [cmake]   C:/Work/Tmp/build-cmake-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug/.qtc/package-manager/auto-setup.cmake:188 (include)
      [cmake]   C:/Work/Tmp/build-cmake-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug/.qtc/package-manager/auto-setup.cmake:192 (qtc_auto_setup_conan)
      [cmake]   CMakeLists.txt:3 (project) 

      Where conan_path.cmake is:

       

                    list(PREPEND CMAKE_PREFIX_PATH "C:\Work\Tmp\build-cmake-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug\conan-dependencies\build\conan")
                    list(PREPEND CMAKE_MODULE_PATH "C:\Work\Tmp\build-cmake-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug\conan-dependencies\build\conan")
                    list(PREPEND CMAKE_FIND_ROOT_PATH "C:\Work\Tmp\build-cmake-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug\conan-dependencies\build\conan")
                    list(REMOVE_DUPLICATES CMAKE_PREFIX_PATH)
                    list(REMOVE_DUPLICATES CMAKE_MODULE_PATH)
                    list(REMOVE_DUPLICATES CMAKE_FIND_ROOT_PATH)
                    set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}" CACHE STRING "" FORCE)
                    set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" CACHE STRING "" FORCE)
                    set(CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}" CACHE STRING "" FORCE) 

      I.e. Windows's dir separator is treated as character escape.

      Attachments

        1. CMakeLists.txt
          0.2 kB
        2. conanfile.txt
          0.0 kB
        3. main.cpp
          0.0 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            cadam Cristian Adam
            igor.mironchik Igor Mironchik
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes