Re: [cmake-developers] Can we please require TR1 to build CMake?
On Mon, Jan 9, 2017 at 8:30 PM, Brad Kingwrote: > On 01/09/2017 05:46 AM, Daniel Pfeifer wrote: > > start using TR1/C++11 library features, namely std::function, std::bind, > > std::placeholders, std::shared_ptr, std::make_shared. > > I'd love to be able to start using those too, but last time I checked > they are not supported everywhere CMake builds, at least in the standard > libraries (see below). > > > AIX-7.1_IBM-12.1 reports that __IBMCPP_TR1__ must be defined to use TR1. > > Hopefully, but that would take some investigation. > > > Xcode 2.1 and 3.2 fail. These builds are not marked as "expected". > > I'd be okay with dropping these. > > > This leaves HP-UX.11iv2.ia64-aCC and Solaris-10-8.11_Oracle-12.3. > > IIUC the Oracle compiler supports C++11 when told to use the proper > stdlib. However, I don't think there is a solution on HP-UX with its > standard library. > > > * Explicitly require SP1 for Visual Studio 2008. > > Okay. For hosting CMake's own build we could even consider requiring > VS 2010. One blocker for that on Kitware's side is updating our > dashboard machines as needed to be able to host CMake builds even if > testing generators for older versions. I'm not sure when I'll have > time to do that. > > > * Disallow compiling in C++98 mode if compiler is capable of C++11. > > Okay. > > > * Require TR1 by all means. This may require setting up Boost.TR1 > > on a very small number of exotic platforms. > > IIRC there is a tool to extract a subset of boost. Please see how > small it can get. We can even remove the config headers for the > platforms we don't need to use it, perhaps manually. > I have pushed an updated branch to https://gitlab.kitware.com/cmake/cmake/merge_requests/760/diffs The necessary subset of boost can be generated with: ``` mkdir -p cm_boost bcp --boost= \ boost/bind.hpp \ boost/function.hpp \ boost/mem_fn.hpp \ boost/ref.hpp \ boost/unordered_map.hpp \ boost/unordered_set.hpp \ boost/shared_ptr.hpp \ boost/weak_ptr.hpp \ boost/enable_shared_from_this.hpp \ cm_boost ``` The resulting directory is 6.5 MB, 2.6 MB of which are preprocessed headers for Boost.MPL. When we remove them, we get the size down to 3.9 MB. Removing individual config headers is tedious and does not save much. Cheers, Daniel -- 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: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Can we please require TR1 to build CMake?
On 01/09/2017 05:46 AM, Daniel Pfeifer wrote: > start using TR1/C++11 library features, namely std::function, std::bind, > std::placeholders, std::shared_ptr, std::make_shared. I'd love to be able to start using those too, but last time I checked they are not supported everywhere CMake builds, at least in the standard libraries (see below). > AIX-7.1_IBM-12.1 reports that __IBMCPP_TR1__ must be defined to use TR1. Hopefully, but that would take some investigation. > Xcode 2.1 and 3.2 fail. These builds are not marked as "expected". I'd be okay with dropping these. > This leaves HP-UX.11iv2.ia64-aCC and Solaris-10-8.11_Oracle-12.3. IIUC the Oracle compiler supports C++11 when told to use the proper stdlib. However, I don't think there is a solution on HP-UX with its standard library. > * Explicitly require SP1 for Visual Studio 2008. Okay. For hosting CMake's own build we could even consider requiring VS 2010. One blocker for that on Kitware's side is updating our dashboard machines as needed to be able to host CMake builds even if testing generators for older versions. I'm not sure when I'll have time to do that. > * Disallow compiling in C++98 mode if compiler is capable of C++11. Okay. > * Require TR1 by all means. This may require setting up Boost.TR1 > on a very small number of exotic platforms. IIRC there is a tool to extract a subset of boost. Please see how small it can get. We can even remove the config headers for the platforms we don't need to use it, perhaps manually. Thanks, -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: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] Can we please require TR1 to build CMake?
Hi and happy 2017, I am currently doing some refactoring (more on that later) and I would like to start using TR1/C++11 library features, namely std::function, std::bind, std::placeholders, std::shared_ptr, std::make_shared. Some background information: The Dinkumware standard library introduced TR1 in version 5.05. Visual Studio 2008 (without Service Pack) ships with version 5.03. Visual Studio 2008 SP1 has version 5.05. Visual Studio 2010 has version 5.20. This version puts the symbols into namespace std. The version number is stored in _CPPLIB_VER. The GNU libstdc++ introduced TR1 in version 4.0. The TR1 headers have been put into a subdirectory. Starting with version 4.3, the headers can be included as in C++11 and the symbols are in namespace std, but only if the language mode is set to C++0x or higher. The library version number is stored in __GLIBCXX__. The LLVM libc++ was designed for C++11 from the beginning. I could not find information about TR1 availability in other standard library implementations. So I made a test run on the nightly dashboard builds. The results are here: https://open.cdash.org/index.php?project=CMake=2016-12-29 I was very surprised by the small number of failed builds. Five expected nightly builds failed on dash2win64.kitware. Apparently Visual Studio 2008 SP1 is not installed. The Intel compiler uses the standard library of Visual Studio. AIX-7.1_IBM-12.1 reports that __IBMCPP_TR1__ must be defined to use TR1. That should be easy to fix. Xcode 2.1 and 3.2 fail. These builds are not marked as "expected". This leaves HP-UX.11iv2.ia64-aCC and Solaris-10-8.11_Oracle-12.3. Here is my concrete proposal: * Explicitly require SP1 for Visual Studio 2008. * Drop support for Xcode 2.1 and 3.2 or mark builds as expected. * Disallow compiling in C++98 mode if compiler is capable of C++11. * Require TR1 by all means. This may require setting up Boost.TR1 on a very small number of exotic platforms. Cheers, Daniel -- 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: http://public.kitware.com/mailman/listinfo/cmake-developers