开发者

Setting Environment Variables For NMAKE Before Building A 'Makefile Solution'

I have an MSVC Makefile Project in which I need to set an environment variable before running NMAKE. For x64 builds I needs to set it to one value, and for x86 builds I need to set it to something else.

So for example, when doing a build I would want to S开发者_如何学GoET PLATFORM=win64 if I'm building a 64-bit compile, or SET PLATFORM=win32 if I'm building 32-bit.

There does not appear to be an option to set environment variables or add a pre-build even for makefile projects.

How do I do this?

EDIT: Running MSVC 2008


Just edit the Configuration Properties + NMake + Build Command Line. Click the button with the dots and enter something like this:

set PLATFORM=win32
nmake -f makefile.mak

Repeat for your 64-bit configuration.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜