1

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.

go4sri
  • 1,490
  • 2
  • 15
  • 29

1 Answers1

2

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 ;)

Community
  • 1
  • 1
paquetp
  • 1,639
  • 11
  • 19
  • for my release config, NDEBUG is being set only in the project where the executable is being built - not in the libraries. so, the asserts are being disabled for this project alone. the others are still being reported. – go4sri May 08 '13 at 10:21