I have a makefile, which is designed to work with nmake (in a ms visual studio command line prompt). The makefile itself sets an environment variable MY_SAY_SOMETHING needed for other tools like a batchfile test.bat. This works very fine with nmake.
However, I want to use Qt's jom instead to speed up my build process by usage of several processor cores with the option -J. The tool jomis considered to be a clone of nmake according to Qt it, so the makefile should be compatible.
The problem is: jom does not set environment variables on a windows machine! At least not in the way the nmake supports it.
So my question is: How do I set an environment variable with jom?
This is the shortest possible example showing my problem:
makefile:
!IF [set MY_SAY_SOMETHING="my super message"]
!ENDIF
all:
@test.bat
test.bat:
@echo off
echo THIS IS MY SUPER MESSAGE "%MY_SAY_SOMETHING%"
Now I'm just calling the makefile with nmake (from the visual studio command line prompt). This looks like this:
D:\> nmake
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01 Copyright (C) Microsoft Corporation. All rights reserved.
THIS IS MY SUPER MESSAGE ""my super message""
When I'm calling jom (either from the visual studio command line prompt or a regular windows cmd.exe prompt), I just get this:
D:\> jom
jom 1.1.3 - empower your cores
THIS IS MY SUPER MESSAGE ""
I also called the -P option for nmake and jom to get more information about how the makefile is interpreted. However, my environment variable was printed with nmake, but not with jom. I also tried the option -E (override environment variable macros) with the same result.
Maybe it is just a bug in jom...