Skip to content

BUILD_COVERAGE doesn't work out-of-the box on Ubuntu 22.10 with gcc 12.2.0 #33

@Overflwn

Description

@Overflwn

I'm running Ubuntu 22.10 with qt6-base and libspdlog-dev installed, running cmake .. -DBUILD_TESTING=ON -DBUILD_COVERAGE=ON runs fine, but running make afterwards (gcc version 12.2.0 (Ubuntu 12.2.0-3ubuntu1) ) returns

[  0%] Built target qspdlog_interface
[  5%] Automatic MOC and UIC for target qspdlog_lib
[  5%] Built target qspdlog_lib_autogen
[ 11%] Automatic RCC for qspdlog_resources.qrc
[ 16%] Building CXX object src/CMakeFiles/qspdlog_lib.dir/qspdlog_lib_autogen/mocs_compilation.cpp.o
c++: error: unrecognized command-line option ‘-fprofile-instr-generate’; did you mean ‘-fprofile-generate’?
c++: error: unrecognized command-line option ‘-fcoverage-mapping’
make[2]: *** [src/CMakeFiles/qspdlog_lib.dir/build.make:88: src/CMakeFiles/qspdlog_lib.dir/qspdlog_lib_autogen/mocs_compilation.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:182: src/CMakeFiles/qspdlog_lib.dir/all] Fehler 2
make: *** [Makefile:101: all] Fehler 2

Originally posted by @Overflwn in #32 (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