How should Premake interpret a flag NOT set?

I've come across a compiler that does NOT enable exceptions or RTTI by default. I'm going back and forth on how to handle it, and want to seek a bit of input before I make a final decision.

Take exceptions as the case in point, there are two options:

  1. If the NoExceptions flag is not set, then enable exceptions. That is, the lack of a NoExceptions flag implicitly enables exceptions.

  2. If the NoExceptions flag is not set, then use the default behavior of the compiler: in this case, exceptions are left disabled. A new flag (presumably named Exceptions) would be required to actually turn them on.

I'm leaning toward solution (1). Since all of the other compilers I've looked at enable exceptions by default, this approach will provide the most consistent behavior across toolsets, which is kind of the whole point of Premake.

Thoughts? Feel free to weigh in with your opinions, but what I'm really looking for are examples and use cases to support one approach over another.

Thanks!

See my reply in mailing list. Out of curiosity, what compiler do you have in mind?

While you are at it, can you add a way to override a flag? In my case a define a common flags table with options (which includes "NoRTTI") but want in an included project that is defined in another file, to override that particular flag and enable RTTI.

I tried adding "RTTI" to the flags but that does not work, of course. Maybe instead of strings Premake should use symbols in the tables, like:

flags { RTTI = false, Exceptions = true }

Related feature request:

http://sourceforge.net/tracker/?func=detail&aid=3435038&group_id=71616&a...

I also would like to see a possibility to override project flags from Premake's command line.