Setting Environment Variables For NMAKE Before Building A 'Makefile Solution'
        Posted  
        
            by John Dibling
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by John Dibling
        
        
        
        Published on 2010-06-02T16:10:22Z
        Indexed on 
            2010/06/02
            16:14 UTC
        
        
        Read the original article
        Hit count: 268
        
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 SET 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
© Stack Overflow or respective owner