Skip to content

[FEA] Add CMake Option to Disable Exceptions #2078

@JieRen98

Description

@JieRen98

I'm working on a project that requires the use of the C++ compile option -fno-exceptions to optimize my library's performance and reduce binary size.

When compiling RMM with -fno-exceptions, I encountered a compilation error because code paths like RMM_EXPECT explicitly or implicitly use throw (e.g.,

: throw _exception_type{std::string{"RMM failure at: "} + __FILE__ + ":" + \
).

Could the RMM library implement a CMake option (similar to SPDLOG_NO_EXCEPTIONS in spdlog) to conditionally disable exception-throwing behavior and allow for compilation with -fno-exceptions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    To-do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions