Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
Qt Creator 16.0.1, Qt Creator 16.0.2
-
None
-
macOS Sequoia 15.5 Intel Core i7
-
-
04215912a (17.0)
Description
Qt Creator doesn't see environment PATH variable and doesn't see ninja executable
There is ninja installed via brew. The executable file is located in /usr/local/bin/ninja. I am trying to configure a simple project in Qt Creator using the Ninja Multi-Config generator and I get the error:
[cmake] CMake Error: CMake was unable to find a build program corresponding to "Ninja Multi-Config". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
[cmake] -- Configuring incomplete, errors occurred!
If I set the variable:
CMAKE_MAKE_PROGRAM=/usr/local/bin/ninja then the error disappears, however, when I call the configuration via the console manually like this:
cmake ../untitled -D CMAKE_GENERATOR="Ninja Multi-Config"
then the problem does not arise at all.
Here is the value of the PATH variable in the console:
echo $PATH /usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin
And here is the value of the PATH variable in the project settings in Qt Creator (Build Settings - CMake - Use Build Environment - Details - PATH):
/usr/bin:/bin:/usr/sbin:/sbin
I.e. it is clear that /usr/local/bin is missing. And if you add the /usr/local/bin path to PATH in these settings, then the configuration will be successful even without setting CMAKE_MAKE_PROGRAM.
I think CMAKE_MAKE_PROGRAM looks like a crutch in this case, because Qt Creator should, in theory, correctly read the current value of the PATH variable.
Attachments
For Gerrit Dashboard: QTCREATORBUG-33016 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
648499,3 | Doc: Be more descriptive wrt environment/path settings in the FAQ | 17.0 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |