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

cmake + gtest_discover_tests not working, path is not set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • Qt Creator 4.6.1
    • All Other Issues
    • None
    • * Windows 7 64 bit
       * Qt Creator 4.6.2
       * Qt 5.9.5 MinGW
       * CMake 3.11.3

    Description

      In CMake there's a new feature to scan for unit tests, it's called gtest_discover_tests() in the GoogleTest module. This works by calling the created test executable just after linking. The test executable will return a list of all tests it contains. However, the system environment is not set correctly at this stage, the appropriate Qt library is not in the path. So if the test executable contains Qt code, it will never work, because it can't find the Qt dlls and will immediately die with error code 0xc0000135 (library not found). In my case, only "C:\Qt\Qt5.9.5\Tools\mingw530_32\bin" appears to be prepended to the path.

      Attachments

        Issue Links

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

          Activity

            People

              con Eike Ziller
              apbaguette Rob Leenheer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes