-
Notifications
You must be signed in to change notification settings - Fork 1.5k
cfg: add relative location of Cppcheck config location to search path #7532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Thanks for your contribution. This is a rather arbitrary addition and needs to be handled differently. Off the top of my head I cannot think of one right now. It also applies to all external files not just I am still in the midst of cleaning up and aligning the lookup handling - I cannot remember if it stalled or if I got side-tracked by more pressing things. |
Two questions:
|
I have not thought much about this yet. I was thinking along indicating the prefix which is used during install. And the suggested change is kinda of valid because it is what we use in the install. Maybe it should be dependent on I always get a very bad feeling when I see hard-coded path traversal in the code. IMO it should always be a fixed (not necessarily absolute path). There might be some existing tickets which already have discussions in it - I have not checked yet. |
FYI I am hesitant in adding anything to the file lookup because the existing behavior is neither consistent nor clearly defined right now. |
I resumed work on the lookup cleanup and will be looking into this soon (hopefully). |
Thanks for looking at this issue so quickly @firewave @danmar !
We install in something like
That would be great! I tried to set FILESDIR to |
(How) do you support custom/user configurations? I think this is a good point to take a closer look at |
so if you compile cppcheck without FILESDIR and install in path
now cppcheck works fine! You can move it.. |
We are installing cppcheck on a distributed filesystem (CVMFS) in various locations.
Since the cppcheck cfg files are installed into
${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}
it would be great if we could use the fact that theshare
folder is relative to the executable, so that we can relocate cppcheck easily.Defining
FILESDIR(_DEF)
does not work for this, since we cannot change this after compilation, and we do not know a priory where the installation will be. We compile cppcheck once and install it on many locations.Thanks!