Skip to content

Commit

Permalink
(conan-io#24273) [boost] Add -fcoroutines for GCC10 only
Browse files Browse the repository at this point in the history
* Add -fcoroutines for GCC10 only

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Use b2 ranged version

Signed-off-by: Uilian Ries <uilianries@gmail.com>

---------

Signed-off-by: Uilian Ries <uilianries@gmail.com>
  • Loading branch information
uilianries authored and memsharded committed Jun 14, 2024
1 parent 3851ed8 commit 6966b76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions recipes/boost/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ def package_id(self):

def build_requirements(self):
if not self.options.header_only:
self.tool_requires("b2/4.10.1")
self.tool_requires("b2/[>=5.2 <6]")

def source(self):
get(self, **self.conan_data["sources"][self.version],
Expand Down Expand Up @@ -1395,7 +1395,7 @@ def add_defines(library):
cxx_flags.append(f"-DBOOST_STACKTRACE_ADDR2LINE_LOCATION={self.options.addr2line_location}")

if not self.options.get_safe('without_cobalt', True) and \
(self.settings.compiler == "gcc" or Version(self.settings.compiler.version) == "10"):
(self.settings.compiler == "gcc" and Version(self.settings.compiler.version) == "10"):
cxx_flags.append("-fcoroutines")

cxx_flags = f'cxxflags="{" ".join(cxx_flags)}"'
Expand Down Expand Up @@ -2038,7 +2038,7 @@ def filter_transform_module_libraries(names):
self.cpp_info.components["headers"].defines.extend(["BOOST_AC_DISABLE_THREADS", "BOOST_SP_DISABLE_THREADS"])

if not self.options.get_safe('without_cobalt', True) and \
(self.settings.compiler == "gcc" or Version(self.settings.compiler.version) == "10"):
(self.settings.compiler == "gcc" and Version(self.settings.compiler.version) == "10"):
self.cpp_info.components["cobalt"].cxxflags.append("-fcoroutines")

#TODO: remove in the future, user_info deprecated in conan2, but kept for compatibility while recipe is cross-compatible.
Expand Down

0 comments on commit 6966b76

Please sign in to comment.