Skip to content

Commit

Permalink
boost: Add options beast_use_std_string_view, asio_disable_eventfd, a…
Browse files Browse the repository at this point in the history
…sio_disable_serial_port, asio_no_experimental_string_view
  • Loading branch information
Sil3ntStorm committed Dec 7, 2022
1 parent 4ad4c37 commit 5660e62
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions recipes/boost/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ class BoostConan(ConanFile):
"header_only": [True, False],
"error_code_header_only": [True, False],
"system_no_deprecated": [True, False],
"asio_disable_eventfd": [True, False],
"asio_disable_serial_port": [True, False],
"asio_no_deprecated": [True, False],
"asio_no_experimental_string_view": [True, False],
"beast_use_std_string_view": [True, False],
"filesystem_no_deprecated": [True, False],
"filesystem_use_std_fs": [True, False],
"filesystem_version": [None, "3", "4"],
Expand Down Expand Up @@ -115,7 +119,11 @@ class BoostConan(ConanFile):
"header_only": False,
"error_code_header_only": False,
"system_no_deprecated": False,
"asio_disable_eventfd": False,
"asio_disable_serial_port": False,
"asio_no_deprecated": False,
"asio_no_experimental_string_view": False,
"beast_use_std_string_view": False,
"filesystem_no_deprecated": False,
"filesystem_use_std_fs": False,
"filesystem_version": None,
Expand Down Expand Up @@ -1078,8 +1086,16 @@ def add_defines(library):
flags.append("define=BOOST_ERROR_CODE_HEADER_ONLY=1")
if self.options.system_no_deprecated:
flags.append("define=BOOST_SYSTEM_NO_DEPRECATED=1")
if self.options.asio_disable_eventfd:
flags.append("define=BOOST_ASIO_DISABLE_EVENTFD=1")
if self.options.asio_disable_serial_port:
flags.append("define=BOOST_ASIO_DISABLE_SERIAL_PORT=1")
if self.options.asio_no_deprecated:
flags.append("define=BOOST_ASIO_NO_DEPRECATED=1")
if self.options.asio_no_experimental_string_view:
flags.append("define=BOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW=1")
if self.options.beast_use_std_string_view:
flags.append("define=BOOST_BEAST_USE_STD_STRING_VIEW=1")
if self.options.filesystem_no_deprecated:
flags.append("define=BOOST_FILESYSTEM_NO_DEPRECATED=1")
if self.options.filesystem_use_std_fs:
Expand Down Expand Up @@ -1447,9 +1463,21 @@ def package_info(self):
if self.options.system_no_deprecated:
self.cpp_info.components["headers"].defines.append("BOOST_SYSTEM_NO_DEPRECATED")

if self.options.asio_disable_eventfd:
self.cpp_info.components["headers"].defines.append("BOOST_ASIO_DISABLE_EVENTFD")

if self.options.asio_disable_serial_port:
self.cpp_info.components["headers"].defines.append("BOOST_ASIO_DISABLE_SERIAL_PORT")

if self.options.asio_no_deprecated:
self.cpp_info.components["headers"].defines.append("BOOST_ASIO_NO_DEPRECATED")

if self.options.asio_no_experimental_string_view:
self.cpp_info.components["headers"].defines.append("BOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW")

if self.options.beast_use_std_string_view:
self.cpp_info.components["headers"].defines.append("BOOST_BEAST_USE_STD_STRING_VIEW")

if self.options.filesystem_no_deprecated:
self.cpp_info.components["headers"].defines.append("BOOST_FILESYSTEM_NO_DEPRECATED")

Expand Down

0 comments on commit 5660e62

Please sign in to comment.