diff --git a/recipes/boost/all/conandata.yml b/recipes/boost/all/conandata.yml index ccb903c0d6eae..225962c917132 100644 --- a/recipes/boost/all/conandata.yml +++ b/recipes/boost/all/conandata.yml @@ -47,6 +47,13 @@ sources: "https://sourceforge.net/projects/boost/files/boost/1.75.0/boost_1_75_0.tar.bz2" ] sha256: "953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb" + 1.76.0: + url: [ + "https://dl.bintray.com/boostorg/release/1.76.0/source/boost_1_76_0.tar.bz2", + "https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2", + "https://sourceforge.net/projects/boost/files/boost/1.76.0/boost_1_76_0.tar.bz2" + ] + sha256: "f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41" patches: 1.69.0: - patch_file: "patches/boost_build_asmflags.patch" diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index bb1a7d1751c2e..a8e54c5527856 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -16,7 +16,7 @@ except ImportError: from io import StringIO -required_conan_version = ">=1.28.0" +required_conan_version = ">=1.33.0" # When adding (or removing) an option, also add this option to the list in @@ -139,6 +139,9 @@ def export(self): @property def _min_compiler_version_default_cxx11(self): # Minimum compiler version having c++ standard >= 11 + if self.settings.compiler == "apple-clang": + # For now, assume apple-clang will enable c++11 in the distant future + return 99 return { "gcc": 6, "clang": 6, @@ -180,6 +183,19 @@ def _all_dependent_modules(self, name): break return dependencies + def _all_super_modules(self, name): + dependencies = {name} + while True: + new_dependencies = set(dependencies) + for module in self._dependencies["dependencies"]: + if dependencies.intersection(set(self._dependencies["dependencies"][module])): + new_dependencies.add(module) + if len(new_dependencies) > len(dependencies): + dependencies = new_dependencies + else: + break + return dependencies + @property def _source_subfolder(self): return "source_subfolder" @@ -247,6 +263,28 @@ def config_options(self): # Shared builds of numa do not link on Visual Studio due to missing symbols self.options.numa = False + if tools.Version(self.version) >= "1.76.0": + # Starting from 1.76.0, Boost.Math requires a c++11 capable compiler + # ==> disable it by default for older compilers or c++ standards + + def disable_math(): + super_modules = self._all_super_modules("math") + for smod in super_modules: + try: + setattr(self.options, "without_{}".format(smod), True) + except ConanException: + pass + + if self.settings.compiler.cppstd: + if not tools.valid_min_cppstd(self, 11): + disable_math() + else: + min_compiler_version = self._min_compiler_version_default_cxx11 + if min_compiler_version is None: + self.output.warn("Assuming the compiler supports c++11 by default") + elif tools.Version(self.settings.compiler.version) < min_compiler_version: + disable_math() + @property def _configure_options(self): return self._dependencies["configure_options"] @@ -272,6 +310,18 @@ def configure(self): if not self.options.i18n_backend: raise ConanInvalidConfiguration("Boost.locale library requires a i18n_backend (either 'icu' or 'iconv')") + if not self.options.without_python: + if not self.options.python_version: + self.options.python_version = self._detect_python_version() + self.options.python_executable = self._python_executable + + if self.options.layout == "b2-default": + self.options.layout = "versioned" if self.settings.os == "Windows" else "system" + + if self.options.without_fiber: + del self.options.numa + + def validate(self): if not self.options.multithreading: # * For the reason 'thread' is deactivate look at https://stackoverflow.com/a/20991533 # Look also on the comments of the answer for more details @@ -294,11 +344,6 @@ def configure(self): if self.options.get_safe("without_{}".format(mod_dep), False): raise ConanInvalidConfiguration("{} requires {}: {} is disabled".format(mod_name, mod_deps, mod_dep)) - if not self.options.without_python: - if not self.options.python_version: - self.options.python_version = self._detect_python_version() - self.options.python_executable = self._python_executable - if not self.options.get_safe("without_nowide", True): # nowide require a c++11-able compiler with movable std::fstream mincompiler_version = self._min_compiler_version_nowide @@ -317,10 +362,6 @@ def configure(self): self.output.warn("I don't know what the default c++ standard of this compiler is. I suppose it supports c++11 by default.\n" "This might cause some boost libraries not being built and conan components to fail.") - # FIXME: check this + shouldn't default be on self._is_msvc? - # if self.options.layout == "b2-default": - # self.options.layout = "versioned" if self.settings.os == "Windows" else "system" - if not all((self.options.without_fiber, self.options.get_safe("without_json", True))): # fiber/json require a c++11-able compiler. if self.settings.compiler.cppstd: @@ -334,15 +375,20 @@ def configure(self): self.output.warn("I don't know what the default c++ standard of this compiler is. I suppose it supports c++11 by default.\n" "This might cause some boost libraries not being built and conan components to fail.") - if self.options.layout == "b2-default": - self.options.layout = "versioned" if self.settings.os == "Windows" else "system" - - if self.options.without_fiber: - del self.options.numa + if tools.Version(self.version) >= "1.76.0": + # Starting from 1.76.0, Boost.Math requires a c++11 capable compiler + if not self.options.without_math: + if self.settings.compiler.cppstd: + tools.check_min_cppstd(self, 11) + else: + min_compiler_version = self._min_compiler_version_default_cxx11 + if min_compiler_version is not None: + if tools.Version(self.settings.compiler.version) < min_compiler_version: + raise ConanInvalidConfiguration("Boost.Math requires a C++11 capable compiler") def build_requirements(self): if not self.options.header_only: - self.build_requires("b2/4.2.0") + self.build_requires("b2/4.5.0") def _with_dependency(self, dependency): """ diff --git a/recipes/boost/all/dependencies/dependencies-1.76.0.yml b/recipes/boost/all/dependencies/dependencies-1.76.0.yml new file mode 100644 index 0000000000000..b404c36315ae1 --- /dev/null +++ b/recipes/boost/all/dependencies/dependencies-1.76.0.yml @@ -0,0 +1,279 @@ +configure_options: +- atomic +- chrono +- container +- context +- contract +- coroutine +- date_time +- exception +- fiber +- filesystem +- graph +- graph_parallel +- iostreams +- json +- locale +- log +- math +- mpi +- nowide +- program_options +- python +- random +- regex +- serialization +- stacktrace +- system +- test +- thread +- timer +- type_erasure +- wave +dependencies: + atomic: [] + chrono: + - system + container: [] + context: + - thread + contract: + - exception + - thread + coroutine: + - context + - exception + - system + - thread + date_time: [] + exception: [] + fiber: + - context + - filesystem + fiber_numa: + - fiber + filesystem: + - system + graph: + - math + - random + - regex + - serialization + graph_parallel: + - filesystem + - graph + - mpi + - random + - serialization + iostreams: + - random + - regex + json: + - container + - exception + - system + locale: + - thread + log: + - atomic + - container + - date_time + - exception + - filesystem + - locale + - random + - regex + - system + - thread + log_setup: + - log + math: + - atomic + math_c99: + - math + math_c99f: + - math + math_c99l: + - math + math_tr1: + - math + math_tr1f: + - math + math_tr1l: + - math + mpi: + - graph + - serialization + mpi_python: + - mpi + - python + nowide: + - filesystem + numpy: + - python + prg_exec_monitor: + - test + program_options: [] + python: [] + random: + - system + regex: [] + serialization: [] + stacktrace: [] + stacktrace_addr2line: + - stacktrace + stacktrace_backtrace: + - stacktrace + stacktrace_basic: + - stacktrace + stacktrace_noop: + - stacktrace + stacktrace_windbg: + - stacktrace + stacktrace_windbg_cached: + - stacktrace + system: [] + test: + - exception + test_exec_monitor: + - test + thread: + - atomic + - chrono + - container + - date_time + - exception + - system + timer: + - chrono + - system + type_erasure: + - thread + unit_test_framework: + - prg_exec_monitor + - test + - test_exec_monitor + wave: + - filesystem + - serialization + wserialization: + - serialization +libs: + atomic: + - boost_atomic + chrono: + - boost_chrono + container: + - boost_container + context: + - boost_context + contract: + - boost_contract + coroutine: + - boost_coroutine + date_time: + - boost_date_time + exception: + - boost_exception + fiber: + - boost_fiber + fiber_numa: + - boost_fiber_numa + filesystem: + - boost_filesystem + graph: + - boost_graph + graph_parallel: + - boost_graph_parallel + iostreams: + - boost_iostreams + json: + - boost_json + locale: + - boost_locale + log: + - boost_log + log_setup: + - boost_log_setup + math: [] + math_c99: + - boost_math_c99 + math_c99f: + - boost_math_c99f + math_c99l: + - boost_math_c99l + math_tr1: + - boost_math_tr1 + math_tr1f: + - boost_math_tr1f + math_tr1l: + - boost_math_tr1l + mpi: + - boost_mpi + mpi_python: + - boost_mpi_python + nowide: + - boost_nowide + numpy: + - boost_numpy{py_major}{py_minor} + prg_exec_monitor: + - boost_prg_exec_monitor + program_options: + - boost_program_options + python: + - boost_python{py_major}{py_minor} + random: + - boost_random + regex: + - boost_regex + serialization: + - boost_serialization + stacktrace: [] + stacktrace_addr2line: + - boost_stacktrace_addr2line + stacktrace_backtrace: + - boost_stacktrace_backtrace + stacktrace_basic: + - boost_stacktrace_basic + stacktrace_noop: + - boost_stacktrace_noop + stacktrace_windbg: + - boost_stacktrace_windbg + stacktrace_windbg_cached: + - boost_stacktrace_windbg_cached + system: + - boost_system + test: [] + test_exec_monitor: + - boost_test_exec_monitor + thread: + - boost_thread + timer: + - boost_timer + type_erasure: + - boost_type_erasure + unit_test_framework: + - boost_unit_test_framework + wave: + - boost_wave + wserialization: + - boost_wserialization +requirements: + iostreams: + - bzip2 + - lzma + - zlib + - zstd + locale: + - iconv + - icu + python: + - python + regex: + - icu + stacktrace: + - backtrace +static_only: +- boost_exception +- boost_test_exec_monitor +version: 1.76.0 diff --git a/recipes/boost/config.yml b/recipes/boost/config.yml index 5d607bcb67b96..50573110c2370 100644 --- a/recipes/boost/config.yml +++ b/recipes/boost/config.yml @@ -13,3 +13,5 @@ versions: folder: all 1.75.0: folder: all + 1.76.0: + folder: all