The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Interesting trick posted by Lars Fosdal on keeping IDE user specific defines

Posted by jpluimers on 2016/07/13

Via Lars Fosdal:

In Tools|Options, Environment Options, Environment Variables – under User Overrides, add a new override

Variable name: DCC_Define

Variable value: billmeyer

This causes a define for billmeyer to exist for anything that you compile in your IDE, across all units, all projects.

Which means you can sprinkle your code with

{$ifdef billmeyer}{$hints on}{$endif}

or

{$ifndef billmeyer}{$hints off}{$endif}

or even isolate out the parts of the code that currently is in development so that it doesn’t get built in the build system.

I believe it was +Uwe Raabe who revealed this gem to me.

–jeroen

via: Is there a mechanism I have not yet found that would allow me to use a DEFINE….

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.