diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2016-02-18 17:12:30 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2016-02-19 09:35:29 +0000 |
commit | 72771de58b440f45dd41d0ff889434d1b44206f4 (patch) | |
tree | 90e96e048025eb43d107537b19b689604a77ef3a | |
parent | ec8f98e70466b01712df9d55d164b546e5115a92 (diff) |
Introduce JOMFLAGS environment variable
Add a MAKEFLAGS pendant, solely for jom.
JOMFLAGS is useful to set up separate flags for nmake and jom.
Change-Id: I0e71c01dfdcf0f59460da8eba922c1adf93c3c33
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
-rw-r--r-- | README | 8 | ||||
-rw-r--r-- | src/app/main.cpp | 4 |
2 files changed, 11 insertions, 1 deletions
@@ -37,6 +37,14 @@ We assume that everything we do happens in the folder X:\build-jom X:\build-jom\> nmake test ... +== Environment variables == + +Like nmake, jom reads default command line arguments from an environment variable: JOMFLAGS. +If JOMFLAGS is not set, MAKEFLAGS is read. +This is useful to set up separate flags for nmake and jom, e.g. + set MAKEFLAGS=L + set JOMFLAGS=Lj8 + == .SYNC dependents == You can use the .SYNC directive on the right side of a description diff --git a/src/app/main.cpp b/src/app/main.cpp index 4ed40fe..c8014aa 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -105,7 +105,9 @@ BOOL WINAPI ConsoleCtrlHandlerRoutine(DWORD dwCtrlType) QStringList getCommandLineArguments() { QStringList commandLineArguments = qApp->arguments().mid(1); - QString makeFlags = qGetEnvironmentVariable(L"MAKEFLAGS"); + QString makeFlags = qGetEnvironmentVariable(L"JOMFLAGS"); + if (makeFlags.isEmpty()) + makeFlags = qGetEnvironmentVariable(L"MAKEFLAGS"); if (!makeFlags.isEmpty()) commandLineArguments.prepend(QLatin1Char('/') + makeFlags); return commandLineArguments; |