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

Environment not applied when CMake is invoked

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • Qt Creator 9.0.0-beta1
    • None
    • Kubuntu 22.04 x86-64, CMake 3.22.1
    • Linux/X11
    • e0a563b23 (9.0)

    Description

      Configured environment variables are not set when QtCreator runs CMake to configure project. This results in configuration error since the necessary system-specific configuration is not applied.

      Please find a test project attached. The test project's CMakeLists.txt uses environment variables `MY_BOOST_INCLUDEDIR` and `MY_BOOST_LIBRARYDIR` to set up directories for a local Boost 1.80.0 installation on the system. These environment variables are set in the QtCreator project (CMakeLists.txt.user). But when I configure this project by running CMake from QtCreator, configuration fails and in the General Output tab I can see `MY_BOOST_INCLUDEDIR` and `MY_BOOST_LIBRARYDIR` variables are not applied (CMakeLists.txt outputs these variables when they are present). The project configures fine when CMake is run from the command line with all environment variables set.

      This is a regression since QtCreator 8.0.2.

      Attachments

        Issue Links

          Activity

            People

              cadam Cristian Adam
              lastique Andrey Semashev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: