[Qt-creator] How to put custom build steps into Git?

Murphy, Sean smurphy at walbro.com
Thu Jul 5 20:46:51 CEST 2018

For our project, we've got two build customizations that we do, that we'd like to be able to put into source control, so that all developers automatically get them. But it appears that adding those steps via Qt Creator causes that information to get stored locally in the .pro.user file, which appears to have user-specific file paths in it, thereby making it a file that I don't think should ever get checked into source control?

So what's the right way to handle this sort of stuff?


PS - my question is really more intended in the general sense but the two specific things we're trying to put in there are:
 - under the Build Settings->Build Steps->Make->Make arguments we want to add the "-j" flag to speed up compilation
 - I've written a custom application that runs as a pre-build step. This application updates a header file with the current Git hash information so that that info get compiled into the application in the About dialog. This way, when users report an issue, I know which commit to start from. This application is located in a path that has a fixed RELATIVE path to the .pro file for the main project, but we need it automatically included as part of the build process when a user clones into this repository and opens the .pro file that the pre-build step is known and executed.

PPS - if there's a cleaner way to grab the Git hash compiled into the application, I'm all ears.

This message has been scanned for malware by Forcepoint. www.forcepoint.com

More information about the Qt-creator mailing list