Skip to content

Commit

Permalink
(#24385) tomlplusplus: Fix exception option handling
Browse files Browse the repository at this point in the history
* Fix expection option handling

* Fix optional optionon value check
  • Loading branch information
AbrilRBS authored Jun 18, 2024
1 parent d19ae90 commit 18ff173
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion recipes/tomlplusplus/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ def package_info(self):
self.cpp_info.set_property("cmake_target_name", "tomlplusplus::tomlplusplus")
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []
if self.options.exceptions.value is not None:
# Casting as a String because None value would not be properly handled, this is a PackageOption, not the value itself
# which `is` never None
if str(self.options.exceptions) != "None":
define_value = "1" if self.options.exceptions is True else "0"
self.cpp_info.defines.append(f"TOML_EXCEPTIONS={define_value}")

0 comments on commit 18ff173

Please sign in to comment.