@@ -19,37 +19,35 @@ Debug Mode
1919----------
2020
2121If you compile mahotas in debug mode, then it will run slower but perform a lot
22- of runtime checks. This is controlled by the `` DEBUG `` environment variable.
22+ of runtime checks.
2323
2424There are two levels:
2525
26- 1. `` DEBUG=1 `` This turns on assertions. The code will run slower, but
26+ 1. A Meson `` debug `` build turns on assertions. The code will run slower, but
2727 probably not noticeably slower, except for very large images.
28- 2. ``DEBUG=2 `` This turns on the assertions and additionally uses the debug
29- version of the C++ library (this only works if you are using GCC). Some of
30- the internal code also picks up on the ``DEBUG=2 `` and adds even more
31- sanity checking. The result will be code that runs **much slower ** as all
32- operations done through iterators into standard containers are now checked
33- (including many inner loop operations). However, it catches many errors.
28+ 2. ``make debug `` uses a Meson ``debug `` build and additionally defines
29+ ``_GLIBCXX_DEBUG ``. This only has an effect with libstdc++, but when
30+ available it enables checked iterators in the C++ standard library. The
31+ result will be code that runs **much slower ** as many iterator operations
32+ are now checked. However, it catches many errors.
3433
3534The Makefile that comes with the source helps you::
3635
3736 make clean
3837 make debug
39- make test
38+ make tests
4039
4140will rebuild in debug mode and run all tests. When you are done testing, use
4241the ``fast `` Make target to get the non-debug build::
4342
4443 make clean
4544 make fast
4645
47- Using make will not change your environment. The `` DEBUG `` variable is set
48- internally only .
46+ Using make will rebuild the editable install in your current Python
47+ environment with the requested configuration .
4948
5049If you don't know about it, check out `ccache <https://ccache.samba.org/ >`__
5150which is a great tool if you are developing in compiled languages (this is not
5251specific to mahotas or even Python). It will allow you to quickly perform
5352``make clean; make debug `` and ``make clean; make fast `` so you never get your
5453builds mixed up.
55-
0 commit comments