PSA: C++11 libraries need to update their libraries.json and CMakeLists.txt
Libraries that now require C++11, such as Atomic, TypeIndex, LexicalCast, need to update their libraries.json files to now state "cxxstd": 11, and to add the C++11 requirement to their CMakeLists.txt files, e.g. target_compile_features(boost_lexical_cast INTERFACE cxx_std_11) boostdep --cmake looks at libraries.json and automatically adds the above requirement, so for generated CMakeLists.txt files (such as the one in lexical_cast), a simple regeneration with e.g. `boostdep --cmake lexical_cast` will suffice. Note that cxx_std_11 requires CMake 3.8, so the cmake_minimum_required line may need to be adjusted as well. (`boostdep --cmake` does that automatically.)
Could you clarify why this is happening for these libs in particular?
Not a complaint; just curious.
Zach
On Sun, Oct 1, 2023 at 7:21 AM Peter Dimov via Boost
Libraries that now require C++11, such as Atomic, TypeIndex, LexicalCast, need to update their libraries.json files to now state "cxxstd": 11, and to add the C++11 requirement to their CMakeLists.txt files, e.g.
target_compile_features(boost_lexical_cast INTERFACE cxx_std_11)
boostdep --cmake looks at libraries.json and automatically adds the above requirement, so for generated CMakeLists.txt files (such as the one in lexical_cast), a simple regeneration with e.g. `boostdep --cmake lexical_cast` will suffice.
Note that cxx_std_11 requires CMake 3.8, so the cmake_minimum_required line may need to be adjusted as well.
(`boostdep --cmake` does that automatically.)
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Zach Laine wrote:
Could you clarify why this is happening for these libs in particular? Not a complaint; just curious.
Sorry, why what is happening?
Zach
On Sun, Oct 1, 2023 at 7:21 AM Peter Dimov via Boost
wrote: Libraries that now require C++11, such as Atomic, TypeIndex, LexicalCast, need to update their libraries.json files to now state "cxxstd": 11, and to add the C++11 requirement to their CMakeLists.txt files, e.g.
target_compile_features(boost_lexical_cast INTERFACE cxx_std_11)
boostdep --cmake looks at libraries.json and automatically adds the above requirement, so for generated CMakeLists.txt files (such as the one in lexical_cast), a simple regeneration with e.g. `boostdep --cmake lexical_cast` will suffice.
Note that cxx_std_11 requires CMake 3.8, so the cmake_minimum_required line may need to be adjusted as well.
(`boostdep --cmake` does that automatically.)
_______________________________________________ Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
I'm just curious why these three libraries are needing a change to
their libraries.json files. Was it just an oversight that should have
been done along with a code change, or was there some other reason?
Zach
On Mon, Oct 2, 2023 at 10:54 AM Peter Dimov via Boost
Zach Laine wrote:
Could you clarify why this is happening for these libs in particular? Not a complaint; just curious.
Sorry, why what is happening?
Zach
On Sun, Oct 1, 2023 at 7:21 AM Peter Dimov via Boost
wrote: Libraries that now require C++11, such as Atomic, TypeIndex, LexicalCast, need to update their libraries.json files to now state "cxxstd": 11, and to add the C++11 requirement to their CMakeLists.txt files, e.g.
target_compile_features(boost_lexical_cast INTERFACE cxx_std_11)
boostdep --cmake looks at libraries.json and automatically adds the above requirement, so for generated CMakeLists.txt files (such as the one in lexical_cast), a simple regeneration with e.g. `boostdep --cmake lexical_cast` will suffice.
Note that cxx_std_11 requires CMake 3.8, so the cmake_minimum_required line may need to be adjusted as well.
(`boostdep --cmake` does that automatically.)
_______________________________________________ Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Zach Laine wrote:
I'm just curious why these three libraries are needing a change to their libraries.json files. Was it just an oversight that should have been done along with a code change, or was there some other reason?
It's not just these three libraries; any library that increases its minimal requirement should do that. I'm just listing these as examples.
Zach
On Mon, Oct 2, 2023 at 10:54 AM Peter Dimov via Boost
wrote: Zach Laine wrote:
Could you clarify why this is happening for these libs in particular? Not a complaint; just curious.
Sorry, why what is happening?
Zach
On Sun, Oct 1, 2023 at 7:21 AM Peter Dimov via Boost
wrote: Libraries that now require C++11, such as Atomic, TypeIndex,
LexicalCast,
need to update their libraries.json files to now state "cxxstd": 11, and to add the C++11 requirement to their CMakeLists.txt files, e.g.
target_compile_features(boost_lexical_cast INTERFACE cxx_std_11)
boostdep --cmake looks at libraries.json and automatically adds the above requirement, so for generated CMakeLists.txt files (such as the one in lexical_cast), a simple regeneration with e.g. `boostdep --cmake lexical_cast` will suffice.
Note that cxx_std_11 requires CMake 3.8, so the cmake_minimum_required line may need to be adjusted as well.
(`boostdep --cmake` does that automatically.)
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (2)
-
Peter Dimov
-
Zach Laine