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

Parsing Error in Coco Plugin

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • Qt Creator 16.0.0
    • Coco Support
    • None
    • Windows

    Description

      Issue Description

      When configuring coverage scanner options in project settings, the plugin generates invalid CMake code that causes build failures.

      Environment

      QtMCUs 2.9.1

      Steps to Reproduce

      Create or open an MCU project in Qt Creator 16
      Navigate to project settings
      Configure coverage scanner options with Windows-style paths, for example:

      --cs-on --cs-mcdc --cs-mcc --cs-exclude-file-abs-wildcard=C:\Qt* --cs-include-path=C:\Qt\QtMCUs\2.9.1\demos\thermo

       

      Click "Save & Re-configure"

       

      We get the following errors:

       

      [cmake] loading initial cache file C:\Qt\QtMCUs\2.9.1\demos\thermo\cocoplugin.cmake
      [cmake] CMake Warning (dev) at cocoplugin.cmake:3 (set):
      [cmake] Syntax error in cmake code at
      [cmake]
      [cmake] C:/Qt/QtMCUs/2.9.1/demos/thermo/cocoplugin.cmake:4
      [cmake]
      [cmake] when parsing string
      [cmake]
      [cmake] --cs-exclude-file-abs-wildcard=C:\Qt*
      [cmake]
      [cmake] Invalid escape sequence \Q
      [cmake]
      [cmake] Policy CMP0010 is not set: Bad variable reference syntax is an error. Run
      [cmake] "cmake --help-policy CMP0010" for policy details. Use the cmake_policy
      [cmake] command to set the policy and suppress this warning.
      [cmake] This warning is for project developers. Use -Wno-dev to suppress it.

      [cmake] CMake Error at cocoplugin.cmake:46 (find_program):
      [cmake]   Could not find code_coverage_c_compiler using the following names:
      [cmake]   csarm-none-eabi-gcc.exe
      [cmake] 
      [cmake] 
      [cmake] – Configuring incomplete, errors occurred!

       

      The error related to finding the code coverage compiler (csarm-none-eabi-gcc.exe) needs investigation, as it persists even after fixing the path escaping problems.

       

      Workarounds

      Manually changing backslashes to forward slashes in the coverage scanner options resolves the escaping issue, but the plugin should handle this conversion automatically.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mred Markus Redeker
            karim.boussema Karim Boussema
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes