-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 default support to C++11 #22554
Conversation
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
🤖 Beep Boop! This pull request is making changes to 'recipes/boost//'. 👋 @grafikrobot @Hopobcn @jwillikers you might be interested. 😉 |
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Hola @grafikrobot ! Please, take a look in this change if possible. It changes how we pass the |
This comment has been minimized.
This comment has been minimized.
Hooks produced the following warnings for commit 2fedc72boost/1.82.0@#c5238cf2ff89472f878a9cb32b3e8202
boost/1.81.0@#663565e59746dfa3d9b15b40b0c93223
boost/1.84.0@#14a3c84208e6440e1f4e02e04e65a07a
boost/1.74.0@#1978fc0376beb50cedcb6ecee5f98021
boost/1.83.0@#d723c467c390230ad0abd1df0d3ddd36
boost/1.77.0@#2bc84a3c4496c607555699e9149b0bd8
boost/1.80.0@#c88efaeb4cafd9f0819b300f74e93552
boost/1.79.0@#2a0ef5ea0c5ad8c7d31518900182fb8a
boost/1.78.0@#c9d61849b0115809573eae30057c7dd0
boost/1.72.0@#21539ff2739c9bda2b09f95338342f1e
boost/1.76.0@#ef7ae94c5c3e86f05ba026568b46e73e
boost/1.75.0@#e2e473c08e4ba5ebd920b2569177fa49
boost/1.73.0@#fec07318f8c4fe017956e90ff43a7ab5
boost/1.71.0@#760210868c29c9814dc2c977d9bd1934
|
recipes/boost/all/conanfile.py
Outdated
@@ -1098,6 +1105,9 @@ def add_defines(library): | |||
if self.settings.get_safe("compiler.cppstd"): | |||
cppstd_flag = AutotoolsToolchain(self).cppstd | |||
flags.append(f"cxxflags={cppstd_flag}") | |||
elif self._has_cppstd_11_supported: | |||
prefix = "/" if is_msvc(self) else "-" | |||
flags.append(f"cxxflags={prefix}std=c++11") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be using the cxxstd
feature instead of adding compiler specific flags. Add a cxxstd=11
argument to the invocation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PS. If it's not already the case.. The recipe should pass in cxxstd=XY
for all the other compiler.cppstd
values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I'll update it.
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Conan v1 pipeline ✔️All green in build 7 (
|
Hooks produced the following warnings for commit 8c70266boost/1.84.0@#695713218cdeec6aef61de1f34bf57ee
boost/1.83.0@#67abd9a563219045b609c298bccb8f42
boost/1.82.0@#c7d44b59c1738ecd5db1679ed58e9ce7
boost/1.71.0@#108a46288f3afbb8a6418b6edc7e2adb
boost/1.72.0@#0abaac50c6785a715ea897b91d71cbd4
boost/1.78.0@#eea1d003ed2400b519cadad2e17804b5
boost/1.81.0@#753df9d4f149a5551335f47abe21de0b
boost/1.79.0@#b30f1da8799cc25469e6aad9a4c02f74
boost/1.80.0@#f37f3526974fd35657763a4ac0959b89
boost/1.75.0@#cdb751a26a5fcc0c1be04cb3eb11d528
boost/1.77.0@#40dff68ce0d38e07fd8609f754bf84d4
boost/1.74.0@#6841bd73e1464d8cba6b01bd8794547d
boost/1.73.0@#2680a5dc1dd7fd2b1dea96fb7788d4e2
boost/1.76.0@#a5984ca48a8b55a70c6cc5178df97014
|
* Add support to C++11 Signed-off-by: Uilian Ries <uilianries@gmail.com> * update tests Signed-off-by: Uilian Ries <uilianries@gmail.com> * update more tests with c++11 Signed-off-by: Uilian Ries <uilianries@gmail.com> * apple clang still does not suport c++11 by default Signed-off-by: Uilian Ries <uilianries@gmail.com> * Use correct cxxstd flag with b2 Signed-off-by: Uilian Ries <uilianries@gmail.com> * format nothing in string Signed-off-by: Uilian Ries <uilianries@gmail.com> --------- Signed-off-by: Uilian Ries <uilianries@gmail.com> Co-authored-by: Rubén Rincón Blanco <git@rinconblanco.es>
Since Boost 1.84.0, basic boost libraries like atomic, filesystem, log, random, thread and test require C++11 (see https://www.boost.org/users/history/version_1_84_0.html), making impossible to build without a
settings.compiler.cppstd
defined when using apple-clang < 14.The apple-clang compiler uses C++98 as its standard until version 14, so without
settings.compiler.cppstd
, this recipe would use the default c++ standard supported by the compiler instead.However, apple-clang supports C++11 since many years ago. Plus, in Conan 1.x is not defined a cppstd by default, even in ConanCenterIndex, it would make impossible to generate new package into Conan Center.
This PR injects
-std=c++11
to cxxflags in case there is NOsettings.compiler.cppstd
defined AND the compiler supports it (see supported_cppstd)fixes #22522
/cc @patmantru