[CMake] Debug build compiles and links, but Release build fails to link?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu Mar 15 11:51:40 EST 2007


On 2007-03-15 09:02+0100 Arjen Markus wrote:

> Alan,
>
> from your description I gather that your assert statement contained a 
> side-effect.
> You should never do that.

I agree.  Nevertheless, these problems slip in, and often for code the
designer of the CMake-based build system is not responsible for.  Also, it
should be emphasised that the assert case is just a simple example of
possible side effects for debug code, and the general conclusion is you must
be on the look out for debug code with side effects when using the -DNDEBUG
compile option.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list