conan icon indicating copy to clipboard operation
conan copied to clipboard

[feature] conan v2: provide a simple method to delete settings in `configure()`

Open SpaceIm opened this issue 3 years ago • 1 comments

According to https://docs.conan.io/en/1.51/migrating_to_2.0/recipes.html#settings, in conan v2 we have to protect deletion of settings in configure() with try/except. It's not very elegant, and might become really ugly in complex recipes. I don't know what the is type of a settings, but maybe add a member function allowing something like self.settings.del_safe("compiler.libcxx")?

And at least for C recipes, some helper function to only keep pure C stuff from settings.compiler would be helpful and more elegant: self.is_pure_c()?

SpaceIm avatar Aug 05 '22 17:08 SpaceIm

Please, read my comments at https://github.com/conan-io/conan/issues/11802 Both are very similar questions.

lasote avatar Aug 08 '22 11:08 lasote

closed by https://github.com/conan-io/conan/pull/12094

SpaceIm avatar Oct 18 '22 20:10 SpaceIm