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

Default generated -C option for enabling coco seems to be incorrect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • Qt Creator 17.0.0
    • Coco Support
    • None
    • Windows

      Reproduction steps

      (1) Enable Coco Code Coverage

      Expected behavior
      Additional CMake options would be compiler-specific cocoplugin.cmake, not the plain cocoplugin.cmake, based on the selected Qt Kit.

      Actual Behavior

      The plain cocoplugin.cmake is filled instead.

       

      Rationale

      In the documentation(https://doc.qt.io/coco/support-for-build-automation-systems.html#cmake), it writes:

      There is a generic file, squishcoco.cmake, and specific setting files (like squishcoco-gcc.cmake) that specifies the compiler. The settings file is then included when the project is configured with CMake, with a command line like
      
      cmake <other options> -Csquishcoco-gcc.cmake
      
      Then the project is configured for code coverage. 

      In fact, I faced a problem with the default behavior of Qt Creator where the compiler and the linker were not properly configured for coco wrappers. The issue was resolved after I changed the line to include the compiler-specific cocoplugin.cmake.

        1. image-2025-08-07-10-39-33-935.png
          20 kB
          Mikio Hirai
        2. image-2025-08-07-10-39-47-538.png
          20 kB
          Mikio Hirai
        3. image-2025-08-07-10-41-17-200.png
          81 kB
          Mikio Hirai
        4. image-2025-08-07-10-41-45-133.png
          70 kB
          Mikio Hirai
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            mred Markus Redeker
            mikio_hirai Mikio Hirai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes