Git Product home page Git Product logo

Comments (4)

ClausKlein avatar ClausKlein commented on May 14, 2024

Hint: all headers included with #include<...> and found with -isystem are suppressed by default (at least by gcc and clang compilers)

from moderncppstarter.

ClausKlein avatar ClausKlein commented on May 14, 2024

When I change the generated compile_commands.json to:

[
{
  "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 cxxopts code 🥇

from moderncppstarter.

ClausKlein avatar ClausKlein commented on May 14, 2024

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

from moderncppstarter.

ClausKlein avatar ClausKlein commented on May 14, 2024

see too https://discourse.cmake.org/t/how-to-prevent-clang-tidy-to-check-sources-added-with-fetchcontents/2871

from moderncppstarter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.