Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-1210

Cannot configure Qt Test Application with CMake

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • None
    • (future version)
    • General
    • Windows 11 23H2
      MSVS 2019, 2022
      Qt 6.5.3, 6.7.2
      qt-vsaddin-msvc2019-x86-3.2.0-rev.103.vsix
      qt-vsaddin-msvc2022-x64-3.2.0-rev.103.vsix
    • 9f84405ba (dev), 6f389546c (dev)

    Description

      Create a new, CMake-based Qt Test Application project using the wizard.
      MSVS will report the following in its Error List:

      Severity	Code	Description	Project	File	Line	Suppression State
      Error		CMake Error at C:/Qt/6.7.2/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:629 (add_executable):
        Cannot find source file:
      
          test.cpp
      
        Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .h .hh .h++
        .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .ispc		C:/Qt/6.7.2/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake	629
      

      Indeed, that file does not exist. The source file of that project is named QtTest<number>.cpp by default

      Found while updating Squish test tst_new_project_file_creation.

      Attachments

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

        Activity

          People

            ali.demiralp Ali Can Demiralp
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes