Skip to content
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

when use cache the depends lib appeared outside the project in clion #563

Open
oskycar opened this issue Jun 7, 2024 · 2 comments
Open

Comments

@oskycar
Copy link

oskycar commented Jun 7, 2024

image

My main project is cpm-test. I used CPM to add some libs in lib lib2 directory's CMakelists.txt. when no cache used , the source file was download and showd in cmake-build-debug/_deps dir . But when I set the CPM_SOURCE_CACHE var, all the depends lib was showed outside the project , It seems strange and inconvenient

@TheLartians
Copy link
Member

That's just where the source code lives, as we currently don't copy it from the cache to the build directory. CLion is correct in showing the outside location as external dependencies are external and shouldn't be touched by users. Not sure if there is a good solution without copying the dependencies.

Copying the cache to build could actually be a valid option in the future, especially for dealing with potential problems with the upcoming patches feature (#558), but for now there is no plan for an implementation.

@Avus-c
Copy link
Contributor

Avus-c commented Jun 8, 2024

Personally and at work, I've set the cache to be project specific (<project_root>/extern or <project_root>/out/deps).

This has in my opinion a few advantages:
You don't have to think about Patches messing up some other project.
The cache doesn't get "polluted" with stuff that isn't needed anymore when deleting a project.
In CLion the project overview should be what you expect (though I don't use CLion)

The additional storage space from having the same deps downloaded 10+ times, turned out to be irrelevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants