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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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:
so I build with
FILESDIR=/home/danielm/.cppcheck/x.y
and then I copy the resulting binarycp cppcheck /home/danielm/.cppcheck/cppcheck-x.y
and I copy the cfg files, addons, platforms to/home/danielm/.cppcheck/x.y