Menu

ctu-info files in build dir

2023-07-14
2023-07-17
  • Samuel Poláček

    I was playing with cppcheck build dir and caching of the build dir to
    speedup cppcheck analysis. What I have observed is that with each cppcheck
    execution, new empty ctu-info files are generated.

    What exactly are ctu-info files? I failed to find documentation in wiki and
    in pdf manual.

    Do I need to keep the files?

     
  • CHR

    CHR - 2023-07-14

    How do you call cppcheck? I only see *.a1, *.s2 and files.txt in the build dir.

     
  • Samuel Poláček

    Try calling cppcheck the following way

    cppcheck \
        `#--quiet` \
        -j $(nproc) \
        --library=googletest \
        --addon=threadsafety.py \
        --cppcheck-build-dir="${CPPCHECK_BUILD_DIR}" \
        --check-level="normal" \
        --suppress=internalAstError `# Ignore internal cppcheck problems we cannot act on` \
        --suppress=syntaxError `# cppcheck may fail to parse some files, ignore them` \
        --project="build/compile_commands.json" \
        .
    
     
  • CHR

    CHR - 2023-07-17

    It seems that those files are generated when an addon is run. You can certainly delete them if they are bothering you.

     
  • Daniel Marjamäki

    CTU=Cross Translation Unit.

    They contain information used for whole program analysis.

    I am not sure why your files are empty. But if they are not empty and you want to enable some whole program analysis checking then I'd recommend that they are kept.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.