Combine commands to delete settings in a single try-catch block

This reduces boilerplate.
This commit is contained in:
Jordan Williams
2022-09-30 08:28:53 -05:00
parent 0dbf6b248a
commit 90f0f1922a

View File

@@ -57,12 +57,9 @@ class PackageConan(ConanFile):
del self.options.fPIC # once removed by config_options, need try..except for a second del
except Exception:
pass
try:
del self.settings.compiler.libcxx # for plain C projects only
except Exception:
pass
try:
del self.settings.compiler.cppstd # for plain C projects only
del self.settings.compiler.libcxx # for plain C projects only
except Exception:
pass