<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>Here is a copy of CMake's flags for a ParaView build.</div><div><br></div><div> CMAKE_CXX_FLAGS </div><div> CMAKE_CXX_FLAGS_DEBUG -gdwarf-2 </div><div> CMAKE_CXX_FLAGS_MINSIZEREL -Os -DNDEBUG -DQT_NO_DEBUG </div><div> CMAKE_CXX_FLAGS_RELEASE -O3 -DNDEBUG -DQT_NO_DEBUG </div><div> CMAKE_CXX_FLAGS_RELWITHDEBINFO -O2 -gdwarf-2 -DQT_NO_DEBUG </div><div><br></div><div>As you can see for a Release build "NDEBUG" is defined so I might try the following:</div><div><br></div><div>#ifndef (NDEBUG)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>// Debug statements are printed<br></div><div> std::cout << .... Debug.. blah blah </div><div>#else</div><div><span class="Apple-tab-span" style="white-space:pre">        </span> //Really fast release code here.<br></div><div>#endif</div><div><br></div><div>Cheers</div><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Bitstream Vera Sans; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-- </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Mike Jackson Senior Research Engineer</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Innovative Management & Technology Services</div><br class="Apple-interchange-newline"></span> </div><br><div><div>On Aug 7, 2008, at 5:08 PM, Chris Cameron wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi, <br><br>I'm looking for a cross-platform way of detecting the build type from C++ code. <br><br>The idea is that if the code is being compiled for release, that certain testing things we do can be eliminated from the release build of our Paraview. <br> <br>Something like<br><br>#ifdef (CMAKE_RELEASE)<br> // do some stuff<br>#else<br> // do other stuff<br>#endif<br><br>would do the trick. Does anyone know the name of the define that I'm looking for?<br clear="all"> <br>-- <br>Chris Cameron<br>Mirarco Mining Innovation - e2vo<br>705-675-1151<br>x5113 <br> </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">ParaView mailing list</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="mailto:ParaView@paraview.org">ParaView@paraview.org</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a></div> </blockquote></div><br></body></html>