Skip to content

Remove debugging information in Release builds when using CMake #702

@lordgamez

Description

@lordgamez

Hi,

In the Apache NiFi - MiNiFi C++ project we created a Couchbase extension using the Couchbase C++ Client. In this extension the Couchbase client is linked statically to the extension library. We are building the Couchbase client using CMake. What we discovered is that even when using the Release build type the library is more than 400MB in size. It seems that the cmake/Backtrace.cmake file is always included in the main CMakeLists.txt which adds the -ggdb3 compile option if the execinfo.h and dlfcn.h are found on the system. Without the Backtrace.cmake include the library is only 25MB.

Is this by design, or could this be changed to only add these compile options if the build type is Debug or RelWithDebInfo, or add it as a separate CMake option to include it or not?

Regards,
Gabor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions