go4sri
go4sri

Reputation: 1490

Visual Studio 2010: set NDEBUG for all projects in a solution

I have about 70 projects in my Visual Studio 2010 C++ solution. I need to set the NDEBUG flag in the compiler flags for all projects to disable asserts. Is there any way to set it for all projects in one shot? Right now, I am having to go in an set it for each project - this is not scaleable and also does not address new projects.

Upvotes: 1

Views: 824

Answers (1)

paquetp
paquetp

Reputation: 1651

NDEBUG is what's defined for the Release configuration (or, at least should be) - and is the default for new C++ projects. Is this what you want?

Ok, I was wrong about that - NDEBUG is not defined by default on new projects.

One thing you can try: Edit the Microsoft.Cpp.<>.user.prop property sheet. Define NDEBUG, and undo your changes if you want it back. It's worth a shot.

Here's a question that has a description of how to do this

Otherwise - I'm outta ideas and your gonna have to start clicking ;)

Upvotes: 2

Related Questions