diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index 629e7ce2ebdf04..cf29e0afd25c21 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -57,6 +57,7 @@ "thread", "timer", "type_erasure", + "url", "wave", ) @@ -275,6 +276,7 @@ def config_options(self): self.options.without_fiber = True self.options.without_nowide = True self.options.without_json = True + self.options.without_url = True else: version_cxx11_standard_json = self._min_compiler_version_default_cxx11 if version_cxx11_standard_json: @@ -282,10 +284,12 @@ def config_options(self): self.options.without_fiber = True self.options.without_json = True self.options.without_nowide = True + self.options.without_url = True else: self.options.without_fiber = True self.options.without_json = True self.options.without_nowide = True + self.options.without_url = True # iconv is off by default on Windows and Solaris if self._is_windows_platform or self.settings.os == "SunOS": @@ -434,7 +438,7 @@ def layout(self): @property def _cxx11_boost_libraries(self): - libraries = ["fiber", "json", "nowide"] + libraries = ["fiber", "json", "nowide", "url"] if Version(self.version) >= "1.76.0": libraries.append("math") if Version(self.version) >= "1.79.0": diff --git a/recipes/boost/all/dependencies/dependencies-1.81.0.yml b/recipes/boost/all/dependencies/dependencies-1.81.0.yml index 16982d7c5bc849..838c68bc7e4324 100644 --- a/recipes/boost/all/dependencies/dependencies-1.81.0.yml +++ b/recipes/boost/all/dependencies/dependencies-1.81.0.yml @@ -29,6 +29,7 @@ configure_options: - thread - timer - type_erasure +- url - wave dependencies: atomic: [] @@ -149,6 +150,8 @@ dependencies: - prg_exec_monitor - test - test_exec_monitor + url: + - system wave: - filesystem - serialization @@ -250,6 +253,8 @@ libs: - boost_type_erasure unit_test_framework: - boost_unit_test_framework + url: + - boost_url wave: - boost_wave wserialization: diff --git a/recipes/boost/all/rebuild-dependencies.py b/recipes/boost/all/rebuild-dependencies.py index 0ad4028e797b3f..05a14b8375a058 100755 --- a/recipes/boost/all/rebuild-dependencies.py +++ b/recipes/boost/all/rebuild-dependencies.py @@ -55,6 +55,7 @@ "thread", "timer", "type_erasure", + "url", "wave", ) diff --git a/recipes/boost/all/test_package/CMakeLists.txt b/recipes/boost/all/test_package/CMakeLists.txt index e34607eab169d2..0e46b7f3657365 100644 --- a/recipes/boost/all/test_package/CMakeLists.txt +++ b/recipes/boost/all/test_package/CMakeLists.txt @@ -116,6 +116,14 @@ if(NOT HEADER_ONLY) target_include_directories(numpy_exe PRIVATE ${PYTHON_INCLUDE_DIRS}) target_link_libraries(numpy_exe PRIVATE Boost::numpy${PYTHON_COMPONENT_SUFFIX} ${PYTHON_LIBRARIES}) endif() + + if(WITH_URL) + find_package(Boost COMPONENTS url REQUIRED) + add_executable(url_exe url.cpp) + target_link_libraries(url_exe PRIVATE Boost::url) + set_property(TARGET url_exe PROPERTY CXX_STANDARD 11) + endif() + endif() # Test header-only target diff --git a/recipes/boost/all/test_package/conanfile.py b/recipes/boost/all/test_package/conanfile.py index 24064240e3ecc3..c28ef1e482f30e 100644 --- a/recipes/boost/all/test_package/conanfile.py +++ b/recipes/boost/all/test_package/conanfile.py @@ -46,6 +46,7 @@ def generate(self): tc.variables["WITH_STACKTRACE"] = not self.dependencies["boost"].options.without_stacktrace tc.variables["WITH_STACKTRACE_ADDR2LINE"] = self.deps_user_info["boost"].stacktrace_addr2line_available tc.variables["WITH_STACKTRACE_BACKTRACE"] = self._boost_option("with_stacktrace_backtrace", False) + tc.variables["WITH_URL"] = not self._boost_option("without_url", True) if self.dependencies["boost"].options.namespace != 'boost' and not self.dependencies["boost"].options.namespace_alias: tc.variables['BOOST_NAMESPACE'] = self.dependencies["boost"].options.namespace tc.generate() @@ -99,3 +100,5 @@ def test(self): self.run(os.path.join(bindir, "stacktrace_basic_exe"), env="conanrun") if self._boost_option("with_stacktrace_backtrace", False): self.run(os.path.join(bindir, "stacktrace_backtrace_exe"), env="conanrun") + if not self._boost_option("without_url", True): + self.run(os.path.join(bindir, "url_exe"), env="conanrun") diff --git a/recipes/boost/all/test_package/url.cpp b/recipes/boost/all/test_package/url.cpp new file mode 100644 index 00000000000000..dd65390f85c359 --- /dev/null +++ b/recipes/boost/all/test_package/url.cpp @@ -0,0 +1,14 @@ +// +// Copyright (c) 2022 alandefreitas (alandefreitas@gmail.com) +// +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt +// + +#include +#include + +int main() { + assert(sizeof(boost::urls::url) > 0); + return 0; +} diff --git a/recipes/boost/all/test_v1_package/conanfile.py b/recipes/boost/all/test_v1_package/conanfile.py index 9888310c2d96f8..3d142c9ad4b110 100644 --- a/recipes/boost/all/test_v1_package/conanfile.py +++ b/recipes/boost/all/test_v1_package/conanfile.py @@ -37,6 +37,7 @@ def build(self): cmake.definitions["WITH_STACKTRACE"] = not self.options["boost"].without_stacktrace cmake.definitions["WITH_STACKTRACE_ADDR2LINE"] = self.deps_user_info["boost"].stacktrace_addr2line_available cmake.definitions["WITH_STACKTRACE_BACKTRACE"] = self._boost_option("with_stacktrace_backtrace", False) + cmake.definitions["WITH_URL"] = not self._boost_option("without_url", True) if self.options["boost"].namespace != 'boost' and not self.options["boost"].namespace_alias: cmake.definitions['BOOST_NAMESPACE'] = self.options["boost"].namespace cmake.configure() @@ -87,3 +88,5 @@ def test(self): self.run(os.path.join("bin", "stacktrace_basic_exe"), run_environment=True) if self._boost_option("with_stacktrace_backtrace", False): self.run(os.path.join("bin", "stacktrace_backtrace_exe"), run_environment=True) + if not self._boost_option("without_url", True): + self.run(os.path.join("bin", "url_exe"), run_environment=True)