"version" predefined pragma
Alexander Panek
alexander.panek at brainsware.org
Thu Feb 23 14:00:17 PST 2006
Victor Nakoryakov wrote:
> Dave wrote:
>
>> Along the same lines as pragma(lib,...) I'm wondering if it would make
>> sense to
>> add something like pragma(switch,...) also, e.g.:
>>
>> pragma(switch,"-version=MY_VERSION");
>> version(Windows)
>> {
>> pragma(switch,"-L/SUBSYSTEM:windows:5");
>> }
>>
>> That would act like the command-line:
>>
>> C:\>dmd foo.d bar.d version=MY_VERSION -L/SUBSYSTEM:windows:5
>>
>>
>
> Because there is to only dmd compiler, and there are different switches
> for different compilers.
>
version(DigitalMars) {
pragma(switch,..);
version(...) {
pragma(..);
}
}
Good enough, I guess.
More information about the Digitalmars-d
mailing list