-
Notifications
You must be signed in to change notification settings - Fork 391
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
prevent clang-tidy warnings for extern libraries used #89
Comments
Hint: all headers included with |
When I change the generated [
{
"directory": "/Users/clausklein/Workspace/cpp/ModernCppStarter/build/standalone",
"command": "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DFMT_HEADER_ONLY=1
-I/Users/clausklein/Workspace/cpp/ModernCppStarter/include -I_deps/greeter-build/PackageProjectInclude
-I/Users/clausklein/.cache/CPM/fmt/9dd47b889fbf7c876d24be56ca097a884004b789/include
-isystem /Users/clausklein/.cache/CPM/cxxopts/d5c328043c71a6a5670c290d8646b093756db962/include
-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1
-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include
-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include
-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk
-std=c++17 -o CMakeFiles/GreeterStandalone.dir/source/main.cpp.o
-c /Users/clausklein/Workspace/cpp/ModernCppStarter/standalone/source/main.cpp",
"file": "/Users/clausklein/Workspace/cpp/ModernCppStarter/standalone/source/main.cpp"
}
] there are no waring about |
This fix it temporarily: perl -i.bak -pe 's#$CPM_SOURCE_CACHE-I#-isystem $1#g' build/install/compile_commands.json
run-clang-tidy.py -p build/install source
# . . .
# no warnings |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i.e. the example use cxxopts which was fetched with CPM.cmake:
The text was updated successfully, but these errors were encountered: