-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update minimum required cmake #765
Conversation
This commit removes few workarounds and explicit setting of CMake policies. It also ensures the required CMake version support VS 2015 (introduced in CMake 3.1) CMake 3.5 is also old enough (release in April 2016) and available (same version or above) in distributions like these ones: * Arch Linux * Ubuntu LTS 14.04, 16.04 * OpenSUSE Leap 42.2, 42.3 * Debian 9, Sid * Fedora 24/25/26 * Slackware 14.2 See https://pkgs.org/download/cmake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Do we need to update required CMake version in all extensions?
@@ -187,7 +187,7 @@ if(APPLE) | |||
# for SuperBuild extensions. | |||
|
|||
file(WRITE ${slicer_extension_cpack_bundle_fixup_directory}/CMakeLists.txt | |||
"cmake_minimum_required(VERSION 3.0) | |||
"cmake_minimum_required(VERSION 3.3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intentionally just 3.3 and not 3.5?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. This one should be updated.
The statement That said:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides confusion over whether it should be CMake 3.3 or 3.5, it looks good.
Oops, I forgot there is the second commit which changes 3.3 -> 3.5. |
This commit removes explicit setting of CMake policies. Note that the setting of CMP0017 to OLD is not needed. See Slicer/Slicer#765
This commit removes explicit setting of CMake policies. Note that the setting of CMP0017 to OLD is not needed. See Slicer/Slicer#765
Setting of CMP0017 to OLD is not needed. See Slicer/Slicer#765
Setting of CMP0017 to OLD is not needed. This commit addresses the following warning reported when using CMake 3.9.0: ``` CMake Deprecation Warning at /path/to/Slicer-build/BRAINSTools/CMakeLists.txt:11 (cmake_policy): The OLD behavior for policy CMP0017 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. ``` See Slicer/Slicer#765
Also remove CMake warnings and fix module category More details below: ------------------------------------------------------------------------ r17134 | COMP: Fix warning removing explicit setting of CMake policy CMP0017. Setting of CMP0017 to OLD is not needed. This commit addresses the following warning reported when using CMake 3.9.0: ``` CMake Deprecation Warning at /home/jcfr/Projects/Slicer-2-build/EMSegment/CMakeLists.txt:12 (CMAKE_POLICY): The OLD behavior for policy CMP0017 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. ``` See Slicer/Slicer#765 ------------------------------------------------------------------------ r17133 | lassoan | COMP: Setting CMP0020 to NEW to remove build warnings ------------------------------------------------------------------------ r17132 | lassoan | ENH: Fixed IslandRemoval module category It was "Filter", while the correct category name is "Filtering" ------------------------------------------------------------------------ r17131 | msmolens | ENH: Call InitializeObjectBase() in New() methods In VTK8 it's necessary for New() methods to call InitializeObjectBase() on the new object for proper tracking with vtkDebugLeaks. The standard macros (vtkStandardNewMacro, vtkObjectFactoryNewMacro) handle this. For those classes that don't use the macros, add calls to InitializeObjectBase(). Continue to support earlier versions of VTK by wrapping calls to InitializeObjectBase() in checks for the preprocessor define VTK_HAS_INITIALIZE_OBJECT_BASE. It's possible that many of these implementations could be simplified by using the standard macros. See also: - Kitware/VTK@e5c793d - http:https://public.kitware.com/pipermail/vtk-developers/2016-September/034332.html git-svn-id: http:https://svn.slicer.org/Slicer4/trunk@26203 3bd1e089-480b-0410-8dfb-8563597acbee
Thanks everyone for the review. Integrated in r26201, r26202 and r26203 Associated forum topic: https://discourse.slicer.org/t/minimum-required-version-of-cmake-updated-to-3-5-0/828 |
Also remove CMake warnings and fix module category More details below: ------------------------------------------------------------------------ r17134 | COMP: Fix warning removing explicit setting of CMake policy CMP0017. Setting of CMP0017 to OLD is not needed. This commit addresses the following warning reported when using CMake 3.9.0: ``` CMake Deprecation Warning at /home/jcfr/Projects/Slicer-2-build/EMSegment/CMakeLists.txt:12 (CMAKE_POLICY): The OLD behavior for policy CMP0017 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. ``` See Slicer/Slicer#765 ------------------------------------------------------------------------ r17133 | lassoan | COMP: Setting CMP0020 to NEW to remove build warnings ------------------------------------------------------------------------ r17132 | lassoan | ENH: Fixed IslandRemoval module category It was "Filter", while the correct category name is "Filtering" ------------------------------------------------------------------------ r17131 | msmolens | ENH: Call InitializeObjectBase() in New() methods In VTK8 it's necessary for New() methods to call InitializeObjectBase() on the new object for proper tracking with vtkDebugLeaks. The standard macros (vtkStandardNewMacro, vtkObjectFactoryNewMacro) handle this. For those classes that don't use the macros, add calls to InitializeObjectBase(). Continue to support earlier versions of VTK by wrapping calls to InitializeObjectBase() in checks for the preprocessor define VTK_HAS_INITIALIZE_OBJECT_BASE. It's possible that many of these implementations could be simplified by using the standard macros. See also: - Kitware/VTK@e5c793d - http:https://public.kitware.com/pipermail/vtk-developers/2016-September/034332.html git-svn-id: http:https://svn.slicer.org/Slicer4/trunk@26203 3bd1e089-480b-0410-8dfb-8563597acbee
Setting of CMP0017 to OLD is not needed. This commit addresses the following warning reported when using CMake 3.9.0: See Slicer/Slicer#765
NOTE: The topic include two commits to facilitate review. I will squash the two commits before integration.