<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QtCreator 20 defaulting to Unix makefilesfor cmake on Ubuntu]]></title><description><![CDATA[<p dir="auto">Using a clean installation of Ubuntu, I installed latest Qt and used QtCreator to open my cmake project.  I see that it defaults to the CMAKE_GENERATOR being Unix Makefiles, so is only building the project on one core.  So how do I switch it to using Ninja?  There seems to be three places to change.  First is the "Kit Configuration" dialog.  I can set Ninja there, but it seems to make no difference.  Then there is the Initial Configuration and Current Configuration tabs.  Editing the fields CMAKE_GENERATOTR in both those tabs, causes the entry to go red in color, but when I run cmake, they get changed back to Unix makefiles.</p>
<p dir="auto">This is the second new machine I have had this problem on.  On the first I somehow after going round and round in circles, I managed to put /home/david/Qt/Tools/Ninja/ninja into the CMAKE_GEBERATOR field and have it stick there.  It remains red in color, but the builds work.  But on this second machine using trial and error I still cant make it stick, it always reverts to Unix makefiles even though Ninja is selected in Kit Configuration.  Help would be appreciated.</p>
]]></description><link>https://forum.qt.io/topic/164876/qtcreator-20-defaulting-to-unix-makefilesfor-cmake-on-ubuntu</link><generator>RSS for Node</generator><lastBuildDate>Mon, 31 Aug 2026 20:31:18 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/164876.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 12 Jul 2026 00:21:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QtCreator 20 defaulting to Unix makefilesfor cmake on Ubuntu on Mon, 13 Jul 2026 14:31:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chortlemortal">@<bdi>ChortleMortal</bdi></a> This usually happens when you don't have <code>ninja</code> in <code>PATH</code>.</p>
<p dir="auto">macOS with homebrew has this issue too.</p>
<p dir="auto">My fix was to go to <em>Preferences &gt; Devices &gt; Local PC</em> and add <code>/opt/homebrew/bin</code> to the <em><div class="plugin-markdown"><input type="checkbox" checked="true" />Search in directories</div></em> field.</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/35af1312-9b9c-48af-8242-58cdbc0623e2.png" alt="macos-ninja.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">The other option is to set the <code>CMAKE_MAKE_PROGRAM</code> CMake variable to your <code>/path/to/ninja</code> executable, whilst having <code>CMAKE_GENERATOR</code> set to <code>Ninja</code>.</p>
]]></description><link>https://forum.qt.io/post/839140</link><guid isPermaLink="true">https://forum.qt.io/post/839140</guid><dc:creator><![CDATA[cristian-adam]]></dc:creator><pubDate>Mon, 13 Jul 2026 14:31:42 GMT</pubDate></item><item><title><![CDATA[Reply to QtCreator 20 defaulting to Unix makefilesfor cmake on Ubuntu on Mon, 13 Jul 2026 18:09:14 GMT]]></title><description><![CDATA[<p dir="auto">And if you have Ninja installed via Qt SDK, you should have in your <code>QtCreator.ini</code> something like:</p>
<pre><code>[CMakeSpecificSettings]
NinjaPath=/Users/cristian/Qt/Tools/Ninja//ninja    
</code></pre>
<p dir="auto">which should get <code>CMAKE_MAKE_PROGRAM</code> set to this value.</p>
]]></description><link>https://forum.qt.io/post/839143</link><guid isPermaLink="true">https://forum.qt.io/post/839143</guid><dc:creator><![CDATA[cristian-adam]]></dc:creator><pubDate>Mon, 13 Jul 2026 18:09:14 GMT</pubDate></item><item><title><![CDATA[Reply to QtCreator 20 defaulting to Unix makefilesfor cmake on Ubuntu on Mon, 13 Jul 2026 17:29:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cristian-adam">@<bdi>cristian-adam</bdi></a><br />
Thank you so much,  Both your solutions work.  Your posting  t not only solves the problem for me but adds clarity as to what is happening.</p>
<p dir="auto">I set both CMAKE_GENERATOR and CMAKE_MAKE_PROGRAM and now cmake is running and building on all cores.</p>
<p dir="auto">After this I looked at the Devices tab in preferences and saw the relationship of the programs qtcreator uses and PATH.  Coming from the windows environment I had never looked at this preference page before.  All my entries were empty, meaning it used $PATH.  qtinstaller puts ninja in Qt/Tools/Ninja but presumably does nothing to the path.   So I set the path to ninja in the Devices page, then created a new session and used another repository, and this time it defaulted to Ninja, and of course worked perfectly</p>
<p dir="auto">Once again thanks,<br />
David</p>
]]></description><link>https://forum.qt.io/post/839142</link><guid isPermaLink="true">https://forum.qt.io/post/839142</guid><dc:creator><![CDATA[ChortleMortal]]></dc:creator><pubDate>Mon, 13 Jul 2026 17:29:43 GMT</pubDate></item><item><title><![CDATA[Reply to QtCreator 20 defaulting to Unix makefilesfor cmake on Ubuntu on Mon, 13 Jul 2026 14:31:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chortlemortal">@<bdi>ChortleMortal</bdi></a> This usually happens when you don't have <code>ninja</code> in <code>PATH</code>.</p>
<p dir="auto">macOS with homebrew has this issue too.</p>
<p dir="auto">My fix was to go to <em>Preferences &gt; Devices &gt; Local PC</em> and add <code>/opt/homebrew/bin</code> to the <em><div class="plugin-markdown"><input type="checkbox" checked="true" />Search in directories</div></em> field.</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/35af1312-9b9c-48af-8242-58cdbc0623e2.png" alt="macos-ninja.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">The other option is to set the <code>CMAKE_MAKE_PROGRAM</code> CMake variable to your <code>/path/to/ninja</code> executable, whilst having <code>CMAKE_GENERATOR</code> set to <code>Ninja</code>.</p>
]]></description><link>https://forum.qt.io/post/839140</link><guid isPermaLink="true">https://forum.qt.io/post/839140</guid><dc:creator><![CDATA[cristian-adam]]></dc:creator><pubDate>Mon, 13 Jul 2026 14:31:42 GMT</pubDate></item></channel></rss>