[CMake] Compilation Error: Modern Compiler + Old STL

Mathieu Garaud mathieu.garaud at gmail.com
Tue Feb 26 10:30:21 EST 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190226/4399ecf7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cm_cxx_cbegin.cxx
Type: application/octet-stream
Size: 102 bytes
Desc: not available
URL: <https://cmake.org/pipermail/cmake/attachments/20190226/4399ecf7/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cm_cxx_size_t.cxx
Type: application/octet-stream
Size: 85 bytes
Desc: not available
URL: <https://cmake.org/pipermail/cmake/attachments/20190226/4399ecf7/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cm_cxx_features.cmake
Type: application/octet-stream
Size: 2796 bytes
Desc: not available
URL: <https://cmake.org/pipermail/cmake/attachments/20190226/4399ecf7/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cm_cxx_cend.cxx
Type: application/octet-stream
Size: 106 bytes
Desc: not available
URL: <https://cmake.org/pipermail/cmake/attachments/20190226/4399ecf7/attachment-0008.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmAlgorithms.h
Type: application/octet-stream
Size: 10289 bytes
Desc: not available
URL: <https://cmake.org/pipermail/cmake/attachments/20190226/4399ecf7/attachment-0009.obj>


More information about the CMake mailing list