Menu

Using both CFGDIR and FILESDIR for legacy version support

2021-08-13
2021-08-13
  • Juozapas Bočkus

    I'm using a dockerfile to be able to build and use multiple CppCheck versions on the same machine. I need both newest released and 1.80 (and a few in between) version support. These versions use different build params: CFGDIR and FILESDIR. Is it safe to just use both of these params in the build script so that both new and legacy version builds are possible with the same script? I've tested with 1.80 and 2.5 built with both of the params set and everything seems to work fine.

     
  • Daniel Marjamäki

    As far as I see that should work.

    I have multiple cppcheck versions on my machine also and that goes fine without docker. I want to test different cppcheck versions now and then.

    Maybe this exact scenario does not work for you but maybe you can do something similar:

    danielm@debian:~/.cppcheck$ pwd
    /home/danielm/.cppcheck
    danielm@debian:~/.cppcheck$ ls -al
    totalt 24348
    drwxr-xr-x  8 danielm danielm    4096 jul  4 10:42 .
    drwxr-xr-x 62 danielm danielm    4096 aug 13 18:59 ..
    drwxr-xr-x  3 danielm danielm    4096 jan 16  2021 1.68
    drwxr-xr-x  3 danielm danielm    4096 jan 16  2021 1.87
    drwxr-xr-x  3 danielm danielm    4096 jan 23  2021 2.2
    drwxr-xr-x  3 danielm danielm    4096 jan 16  2021 2.3
    drwxr-xr-x  3 danielm danielm    4096 maj 10 20:47 2.4
    drwxr-xr-x  5 danielm danielm    4096 jul  4 10:40 2.5
    -rwxr-xr-x  1 danielm danielm 2471856 jan 16  2021 cppcheck-1.68
    -rwxr-xr-x  1 danielm danielm 3356608 jan 16  2021 cppcheck-1.87
    -rwxr-xr-x  1 danielm danielm 4593112 jan 23  2021 cppcheck-2.2
    -rwxr-xr-x  1 danielm danielm 4622480 jan 16  2021 cppcheck-2.3
    -rwxr-xr-x  1 danielm danielm 4881776 maj 10 20:48 cppcheck-2.4
    -rwxr-xr-x  1 danielm danielm 4964224 jul  4 10:42 cppcheck-2.5
    

    so I build with FILESDIR=/home/danielm/.cppcheck/x.y and then I copy the resulting binary cp cppcheck /home/danielm/.cppcheck/cppcheck-x.y and I copy the cfg files, addons, platforms to /home/danielm/.cppcheck/x.y

     

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.