Code Monkey home page Code Monkey logo

Comments (7)

onqtam avatar onqtam commented on May 20, 2024

my guess is that DEBUG (see here) isn't defined when xcode is used as the generator - a friend already told me about this - I hadn't tested it - will fix. This was taken directly from Catch so I supposed it would work for OSX...

from doctest.

pthom avatar pthom commented on May 20, 2024

Actually I was using the make generator : just type cmake then make
Hope this helps

from doctest.

pthom avatar pthom commented on May 20, 2024

Same issue if I write cmake -DCMAKE_BUILD_TYPE=Debug or Release

from doctest.

pthom avatar pthom commented on May 20, 2024

If I define DEBUG it will work.
However, my guess is that cmake defines NDEBUG for release builds, and nothing for debug builds (which is unfortunate). May be this should go in the readme.

See http://stackoverflow.com/questions/8591762/ifdef-debug-with-cmake-independent-from-platform

from doctest.

ongamex avatar ongamex commented on May 20, 2024

Hmm, "NDEBUG" should be defined for non-debug builds under clang and gcc if remember correctly.

from doctest.

netheril96 avatar netheril96 commented on May 20, 2024

Wrapping DOCTEST_BREAK_INTO_DEBUGGER in a #ifdef DEBUG is really unnecessary, since the extra code generated when defined is very small, while not defining it makes it a pain to use. People do run optimized code under debuggers. In other words, this is but a useless premature optimization. Yes, Catch does it, and that is equally pointless.

from doctest.

netheril96 avatar netheril96 commented on May 20, 2024

In fact, the DEBUG guard is only present for OS X targets, but not Windows and Linux targets. An inconsistent design.

from doctest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.