Compilation Error: Modern Compiler + Old STL

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Compilation Error: Modern Compiler + Old STL

Mathieu Garaud
Hello,

While compiling cmake3.13.4 using pkgsrc I had an error because I'm using a new version of clang7.0.1 witth an old version of libstdc++5.4.0.

I propose to change the preprocess tests using __cplusplus >= xxx  in Source/cmAlgorithms.h by their appropriate define like you do for unique_ptr using: CMake_HAVE_CXX_UNIQUE_PTR.

To make it work you need to add the extra cm_check_cxx_feature in Source/Checks/cm_cxx_features.cmake and the test files in Source/Checks: cm_cxx_size_t.cxx, cm_cxx_cbegin.cxx and cm_cxx_cend.cxx.

I attached the files I modified as example it won't take more than 15min to diff, integrate and commit I promise. What do you think?

Best,

Mathieu








--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

cm_cxx_cbegin.cxx (138 bytes) Download Attachment
cm_cxx_size_t.cxx (118 bytes) Download Attachment
cm_cxx_features.cmake (3K) Download Attachment
cm_cxx_cend.cxx (146 bytes) Download Attachment
cmAlgorithms.h (13K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Compilation Error: Modern Compiler + Old STL

CMake mailing list
On 2/26/19 10:30 AM, Mathieu Garaud wrote:
> While compiling cmake3.13.4 using pkgsrc I had an error because I'm using a
> new version of clang7.0.1 witth an old version of libstdc++5.4.0.

Thanks.  For reference in list archives, Mathieu opened a MR here:

  https://gitlab.kitware.com/cmake/cmake/merge_requests/3030

-Brad
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake