[vtk-developers] VTK updated to CMake 3.3 and C++11
Robert Maynard
robert.maynard at kitware.com
Thu Jan 19 09:02:22 EST 2017
That does look like the perfect way to resolve this.
On Wed, Jan 18, 2017 at 11:52 PM, Andrew Maclean
<andrew.amaclean at gmail.com> wrote:
> Actually ... in looking at CMakeLists.txt all you need to do is update the
> compiler versions in lines 262-295 and you're done!
>
> Regards
> Andrew
>
> On Thu, Jan 19, 2017 at 1:11 PM, Andrew Maclean <andrew.amaclean at gmail.com>
> wrote:
>>
>> No worries!
>>
>> Andrew Maclean
>>
>> On 19 Jan 2017 13:10, "Robert Maynard" <robert.maynard at kitware.com> wrote:
>>
>> Thanks for spotting this, I won't be able to get a fix in before tomorrow
>> morning unfortunately.
>>
>> Sent from my iPhone
>>
>> On Jan 18, 2017, at 8:32 PM, Andrew Maclean <andrew.amaclean at gmail.com>
>> wrote:
>>
>> This change in CMakeLists.txt will cause problems in Visual Studio:
>> ---
>> if( NOT cxx_nullptr IN_LIST CMAKE_CXX11_COMPILE_FEATURES)
>> option(VTK_IGNORE_CXX11_REQUIREMENT OFF)
>> if(NOT VTK_IGNORE_CMAKE_CXX11_CHECKS)
>> message(FATAL_ERROR "VTK now requires a compiler that supports C++11")
>> endif()
>> endif()
>> ---
>> because CMAKE_CXX11_COMPILE_FEATURES is always empty for MSVC compilers.
>>
>> Anyway, if you look at
>> https://msdn.microsoft.com/en-us/library/hh567368.aspx
>> nullptr is probably a bad one to test for with microsoft compilers as it
>> has been supported since VS 2010.
>>
>> Could I suggest using CMAKE_CXX_COMPILER_ID and CMAKE_CXX_COMPILER_VERSION
>> instead?
>>
>> For example:
>> message(STATUS "Compiler ID/Version: ${CMAKE_CXX_COMPILER_ID}
>> ${CMAKE_CXX_COMPILER_VERSION}")
>> WIll give you a line like:
>> The CXX compiler identification is MSVC 19.0.24215.1
>> It also works with gcc.
>>
>> Regards
>> Andrew
>>
>>
>>
>>
>>>
>>> ---------- Forwarded message ----------
>>> From: Robert Maynard <robert.maynard at kitware.com>
>>> To: vtk vtk <vtkusers at vtk.org>, VTK Developers <vtk-developers at vtk.org>
>>> Cc:
>>> Date: Wed, 18 Jan 2017 12:11:21 -0500
>>> Subject: [vtk-developers] VTK updated to CMake 3.3 and C++11
>>> I am happy to announce that over the last two weeks we have rolled out a
>>> series of updates to VTK that mean the minimum required CMake version
>>> is now 3.3 (see below), and now builds with C+11 enabled.
>>>
>>> Yes VTK now requires a C++11 capable compiler. Initial we are only asking
>>> for a
>>> minimal set of C++11 features (nullptr), but as continue forward through
>>> the
>>> year we are going require a larger set of C++11 features. The final exact
>>> versions for each compiler have not been set in stone, but a rough
>>> estimation
>>> would be:
>>> - GCC 4.8+
>>> - Clang 3.3+
>>> - XCode 5.0+
>>> - MSVC 2013+
>>>
>>> I wanted to send this announcement out to bring up a couple of points:
>>>
>>> 1. Thanks to everyone that has helped get VTK ready for C++11! The final
>>> CMake
>>> switch over to C++11 was very easy, only because of all the hard work
>>> that other
>>> developers did in anticipation of this. So thank you very much.
>>>
>>> 2. The major reason for this slow roll out of C++11 is so that we
>>> minimize the
>>> impact on current VTK merge requests, while also minimizing dashboard
>>> instability. Contributors please be aware of these changes if you have
>>> long
>>> running branches.
>>>
>>> 3. We currently have dashboard machines running GCC 4.6 & 4.7. We are
>>> currently
>>> working up a plan on how best to transition these machines to at least
>>> GCC 4.8
>>> as the roll out continues.
>>>
>>> 4. The current MinGW dashboard machine doesn't support C++11 and will be
>>> removed, with no plan of a replacement at Kitware. If the community is
>>> interested in maintaining a newer MinGW machine I can provide assistance
>>> on how to setup a machine.
>>>
>>>
>>> ============
>>>
>>> Why CMake 3.3:
>>>
>>> We have chosen CMake 3.3 as the minimum required version for numerous
>>> reasons,
>>> the most important of those reasons being:
>>>
>>> - It is the first CMake release that offers C++11 support for all four
>>> major
>>> compilers ( GCC / MSVC / Clang / XCode ).
>>>
>>> - The CMake version is sufficiently new enough that it allows for a
>>> cleaning
>>> of the existing CMake infrastructure. The current CMake minimum version
>>> requires VTK to maintain forks of numerous FindPackages and Modules
>>> that are
>>> part of newer CMake versions.
>>>
>>> - Supports HTTPS downloads, with all the official binaries come with
>>> support.
>>> Allowing for migration of external data to a HTTPS only server.
>>> Something we
>>> are going to require in the near future.
>>>
>>>
>>>
>>
>>
>> --
>> ___________________________________________
>> Andrew J. P. Maclean
>>
>> ___________________________________________
>>
>>
>
>
>
> --
> ___________________________________________
> Andrew J. P. Maclean
>
> ___________________________________________
More information about the vtk-developers
mailing list