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 version 1.84.0 #21747

Merged
merged 14 commits into from
Jan 24, 2024
9 changes: 9 additions & 0 deletions recipes/boost/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
sources:
"1.84.0":
url:
- "https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.bz2"
- "https://sourceforge.net/projects/boost/files/boost/1.84.0/boost_1_84_0.tar.bz2"
sha256: "cc4b893acf645c9d4b698e9a0f08ca8846aa5d6c68275c14c3e7949c24109454"
"1.83.0":
url:
- "https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2"
Expand Down Expand Up @@ -63,6 +68,10 @@ sources:
url: "https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2"
sha256: "d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee"
patches:
"1.84.0":
- patch_file: "patches/1.82.0-locale-iconv-library-option.patch"
patch_description: "Optional flag to specify iconv from either libc of libiconv"
patch_type: "conan"
"1.83.0":
- patch_file: "patches/1.82.0-locale-iconv-library-option.patch"
patch_description: "Optional flag to specify iconv from either libc of libiconv"
Expand Down
54 changes: 51 additions & 3 deletions recipes/boost/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
CONFIGURE_OPTIONS = (
"atomic",
"chrono",
"cobalt",
"container",
"context",
"contract",
Expand Down Expand Up @@ -163,16 +164,25 @@ def export_sources(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
Comment on lines -166 to -168
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it removed? apple-clang 14 & 15 default C++ standard is still C++98.

return {
"gcc": 6,
"clang": 6,
"apple-clang": 14,
"Visual Studio": 14, # guess
"msvc": 190, # guess
}.get(str(self.settings.compiler))

@property
def _min_compiler_version_default_cxx20(self):
return {
"gcc": 99,
"clang": 99,
# As of the end of 2023, only apple-clang >=14 use C++20 as their default C++ version.
"apple-clang": 14,
"Visual Studio": 99,
"msvc": 999,
}.get(str(self.settings.compiler))

@property
def _min_compiler_version_nowide(self):
# Nowide needs c++11 + swappable std::fstream
Expand Down Expand Up @@ -369,6 +379,28 @@ def disable_locale():
elif Version(self.settings.compiler.version) < min_compiler_version:
disable_locale()

if Version(self.version) >= "1.84.0":
# Starting from 1.84.0, Boost.Cobalt requires a c++20 capable compiler
# ==> disable it by default for older compilers or c++ standards

def disable_cobalt():
super_modules = self._all_super_modules("cobalt")
for smod in super_modules:
try:
setattr(self.options, f"without_{smod}", True)
except ConanException:
pass

if self.settings.compiler.get_safe("cppstd"):
if not valid_min_cppstd(self, 20):
disable_cobalt()
else:
min_compiler_version = self._min_compiler_version_default_cxx20
if min_compiler_version is None:
self.output.warning("Assuming the compiler supports c++20 by default")
elif Version(self.settings.compiler.version) < min_compiler_version:
disable_cobalt()

@property
def _configure_options(self):
return self._dependencies["configure_options"]
Expand Down Expand Up @@ -429,6 +461,10 @@ def configure(self):
if self.options.without_fiber:
self.options.rm_safe("numa")

# FIXME: Compilation errors on msvc shared build for boost.fiber https://github.com/boostorg/fiber/issues/314
if Version(self.version) >= "1.84.0" and is_msvc(self) and self._shared:
self.options.without_fiber = True

def layout(self):
basic_layout(self, src_folder="src")

Expand All @@ -441,6 +477,14 @@ def _cxx11_boost_libraries(self):
libraries.append("wave")
if Version(self.version) >= "1.81.0":
libraries.append("locale")
if Version(self.version) >= "1.84.0":
libraries.append("atomic")
libraries.append("filesystem")
libraries.append("log")
libraries.append("random")
libraries.append("stacktrace")
libraries.append("test")
libraries.append("thread")
libraries.sort()
return filter(lambda library: f"without_{library}" in self.options, libraries)

Expand All @@ -457,6 +501,10 @@ def validate(self):
if is_msvc(self) and self._shared and is_msvc_static_runtime(self):
raise ConanInvalidConfiguration("Boost can not be built as shared library with MT runtime.")

# FIXME: In 1.84.0, there are compilation errors on msvc shared build for boost.fiber.
if Version(self.version) >= "1.84.0" and is_msvc(self) and self._shared and not self.options.without_fiber:
raise ConanInvalidConfiguration("Boost.fiber can not be built as shared library on MSVC.")

if not self.options.without_locale and self.options.i18n_backend_iconv == "off" and \
not self.options.i18n_backend_icu and not self._is_windows_platform:
raise ConanInvalidConfiguration(
Expand Down
Loading