Menu

Build dir has to be existent, CLI vs Gui 2.16 vs 2.17

2025-02-27
2025-03-10
  • Jens Lund Jensen

    Hi

    I have a project file with a builddir. which is run both with gui and cli on a CI server.
    The project dir does not exist when starting cppcheck.
    In 2.16 the gui asked to create it and the cli just ignored it( or created it?)
    in 2.17 the gui still asks but the cli reports an error:
    cppcheck: error: Directory 'c:\cppcheck-build-dir' specified by --cppcheck-build-dir argument has to be existent.

    When running cli on a CI server i dont need a build dir. but when running the gui on a developer pc i want a builddir.

     
  • Oliver Stöneberg

    The error from the CLI was previously only produced during the handling of the --cppcheck-build-dir option. In https://github.com/danmar/cppcheck/pull/6942 this logic was moved to be done unconditionally after all the option have been processed.

    I assume you are running the GUI and CLI from the same project file which contains a configured project path. Using --no-cppcheck-build-dir you can override the one from the project. You need to specify it after the --project argument.

    FYI The GUI settings handling is different from the CLI one which is causing inconsistencies and issues, as well as breaking the left-to-right processing order. https://trac.cppcheck.net/ticket/13623 is about rectifying his and https://github.com/danmar/cppcheck/pull/7293 is a WIP PR.

     
  • Jens Lund Jensen

    Thanks
    It works now.

     

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.