Skip to content

Assertions are no-ops in test programs when using CMake "release" build configurations #3

Description

@Jenny-fa

Several test programs in Origin make use of the C library's assert macro, which is problematic because three of CMake's predefined build configurations ("Release", "MinSizeRel", and "RelWithDebInfo") use the compiler flag -DNDEBUG, which causes assert to become a no-op. Unless this is the intended behavior, test programs should use an alternate assert macro/function.

Note: The "Debug" configuration has no such problem, as does building Origin without explicitly specifying a configuration (the default option).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions