Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Overflwn opened this issue Jan 25, 2023 · 2 comments

Comments

@Overflwn
Copy link
Collaborator

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)

@arsdever
Copy link
Owner

I haven't built it with gcc. Actually, I'm not sure if I will consider supporting gcc. Probably will update the readme to let the devs know that they should use clang (at least until I consider adapting to gcc).

@Overflwn
Copy link
Collaborator Author

You're right. Using clang works just fine. I think gcc supports code coverage flags too, they're just called differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants