-
Notifications
You must be signed in to change notification settings - Fork 989
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
[bug] conan tries to overwrite project's CMakePresets.json
#15052
Comments
this is a very inconvenient and causes a lot of frustration - many projects have their own |
Lets try to add a check to avoid that. In any case, the
Note that we will raise an error saying that |
I've just checked new 2.0 tutorial, and indeed it does recommend
I think it's useful to re-check new tutorial from time to time to learn new practices, as many of my habits came straight from 1.X era xD. anyway, there are several alternatives to consider:
to add some background to the issue - it's indeed a regression, as earlier conan version didn't overwrite this file (I don't remember which release - it might take some time for me to do git bisect to discover when conan first started to overwrite user's |
as I remember (correct me if I am wrong), it should be completely optional - CMakePresets.json is since CMake 3.19. but per conan tribe, conan's target is CMake 3.15. so |
No, Conan reads this file, even when running with CMake 3.15. The file must exist and must be created. |
I wonder how does it ever work, if user's CMake doesn't support it? |
Conan reads the values and pass them in command line. |
Environment details
Linux debian12 6.5.7-x64v3-xanmod1 #0~20231010.gfdab4ec SMP PREEMPT_DYNAMIC Tue Oct 10 21:39:15 UTC x86_64 GNU/Linux
gcc (Debian 12.2.0-14) 12.2.0
Conan version 2.1.0-dev
Python 3.11.6
Steps to reproduce
touch CMakePresets.json
chmod aug-w CMakePresets.json
conan install --requires zlib/1.2.11@ --build missing -g CMakeToolchain
Logs
The text was updated successfully, but these errors were encountered: