Skip to content
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

boost: Add configure options #14625

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
Comment on lines +1097 to +1098
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My concern here is these change really quickly and managing them with each version is a pain boostorg/beast@7300ef4

This one is already deprecated 🙊

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