The example use cxxopts
which was fetched with CPM.cmake
using FetchContents
:
builddriver executing: 'run-clang-tidy.py -p build/standalone -checks=-*,modernize-*,misc-*,hicpp-*,cert-*,readability-*,portability-*,performance-*,google-* standalone'
Compilation SUCCEED in 8.628576 seconds
Number of warnings: 238
WarningErrorEntry(path='/Users/clausklein/.cache/CPM/cxxopts/d5c328043c71a6a5670c290d8646b093756db962/include/cxxopts.hpp', lineno='51', severity='warning', message="declaration uses identifier 'CXXOPTS__VERSION_MAJOR', which is a reserved identifier [cert-dcl37-c,cert-dcl51-cpp]", column='9')
WarningErrorEntry(path='/Users/clausklein/.cache/CPM/cxxopts/d5c328043c71a6a5670c290d8646b093756db962/include/cxxopts.hpp', lineno='52', severity='warning', message="declaration uses identifier 'CXXOPTS__VERSION_MINOR', which is a reserved identifier [cert-dcl37-c,cert-dcl51-cpp]", column='9')
WarningErrorEntry(path='/Users/clausklein/.cache/CPM/cxxopts/d5c328043c71a6a5670c290d8646b093756db962/include/cxxopts.hpp', lineno='53', severity='warning', message="declaration uses identifier 'CXXOPTS__VERSION_PATCH', which is a reserved identifier [cert-dcl37-c,cert-dcl51-cpp]", column='9')
WarningErrorEntry(path='/Users/clausklein/.cache/CPM/cxxopts/d5c328043c71a6a5670c290d8646b093756db962/include/cxxopts.hpp', lineno='212', severity='warning', message="use 'using' instead of 'typedef' [modernize-use-using]", column='3')
WarningErrorEntry(path='/Users/clausklein/.cache/CPM/cxxopts/d5c328043c71a6a5670c290d8646b093756db962/include/cxxopts.hpp', lineno='216', severity='warning', message='use a trailing return type for this function [modernize-use-trailing-return-type]', column='3')
WarningErrorEntry(path='/Users/clausklein/.cache/CPM/cxxopts/d5c328043c71a6a5670c290d8646b093756db962/include/cxxopts.hpp', lineno='223', severity='warning', message='use a trailing return type for this function [modernize-use-trailing-return-type]', column='3')
WarningErrorEntry(path='/Users/clausklein/.cache/CPM/cxxopts/d5c328043c71a6a5670c290d8646b093756db962/include/cxxopts.hpp', lineno='230', severity='warning', message='use a trailing return type for this function [modernize-use-trailing-return-type]', column='3')
WarningErrorEntry(path='/Users/clausklein/.cache/CPM/cxxopts/d5c328043c71a6a5670c290d8646b093756db962/include/cxxopts.hpp', lineno='230', severity='warning', message="non-const reference parameter 's', make it const or use a pointer [google-runtime-references]", column='23')
WarningErrorEntry(path='/Users/clausklein/.cache/CPM/cxxopts/d5c328043c71a6a5670c290d8646b093756db962/include/cxxopts.hpp', lineno='230', severity='warning', message="the parameter 'a' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]", column='33')
WarningErrorEntry(path='/Users/clausklein/.cache/CPM/cxxopts/d5c328043c71a6a5670c290d8646b093756db962/include/cxxopts.hpp', lineno='232', severity='warning', message='passing result of std::move() as a const reference argument; no move will actually happen [hicpp-move-const-arg,performance-move-const-arg]', column='21')
# . . .
Hint: all headers included with #include<...>
and found with -isystem
are suppressed by default (at least by gcc
and clang
compilers)
When the library is installed and used with find_package(cxxopts)
it works fine.