Skip to content

enable_sanitizers/code coverage can only be applied to one target at a time #3219

@cmacmackin

Description

@cmacmackin

The enable_sanitizers function can optionally enable code coverage flags to be applied (if ENABLE_COVERAGE=TRUE). In that case, it will create the targets code-coverage-capture and code-coverage-clean. Unforunately, this means that if you try to apply the sanitizers to any other library then it will try to create additional targets with the same name, causing a CMake error.

Relatedly, the code-coverage-capture target has a hard-coded reference to the directory ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/bout++.dir/src. This means it can actually only be used with the bout++ library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions