We use MPC to generate Makefiles/Project files for Linux and VS8.
We have a .mwc file that incudes .mpc files from different sub-
projects:
workspace {
../proj1/proj1.mpc
../proj2/proj2.mpc
.....
}
All Project/Makefiles are generated by a single invocation of
'mwc.pl ... -type make -type vc9 workspace.mwc'.
Everything's OK so far.
Now the question:
All sub-projects are cross-platform except for one, which can only be
built on Win32.
Is it possible to exclude that single .mpc file without using two
different .mwc files?
Something like the 'specific' keyword but inside the workspace file ?
Thanks in advance
Stefan
> All sub-projects are cross-platform except for one, which can only be
> built on Win32.
> Is it possible to exclude that single .mpc file without using two
> different .mwc files?
> Something like the 'specific' keyword but inside the workspace file ?
>
> Thanks in advance
I've not found any way to do this. That doesn't mean there isn't one,
of course. But what I do until I find a better way is arrange the
contents of the cpp file so it looks like this:
#ifdef WIN32
: what you first thought of....
#endif
Note that I use WIN32 rather than _WIN32, the macro set by the
Microsoft compiler. If your project does not already set this macro
then IMO it should. This allows the code to be specific to WIN32 but
not to the Microsoft compiler (for which I use _MSC_VER).
Regards,
Andrew Marlow