When building, I want to speed up the build with environment variable:
MAKEFLAGS=-j12
I know how to set this in Qt Creator:
Projects → Build → Build Environment Details → Add
Add
MAKEFLAGS
with a value of-j12
This shows up in the *.pro.user file as:
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges">
<value type="QString">MAKEFLAGS=-j12</value>
</valuelist>
The process works great and really speeds up the compile, but I have to go through this step for each kit and debug/release combo. When I upgrade Qt releases, I have to do this process all over for each combination.
How can I set that environment variable in the *.pro file and have the environment variable propagate into every build flow?
Per the comments and the linked question, I have tried the *.pro.shared
as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<qtcreator>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges">
<value type="QString">MAKEFLAGS=-j12</value>
</valuelist>
</valuemap>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">18</value>
</data>
<data>
<variable>Version</variable>
<value type="int">18</value>
</data>
</qtcreator>
The 18
matches that generated when I nuke and then Qt Creator recreates the *.pro.user
file on restart of Qt Creator