[Insight-developers] WrapITK cmake_minimum_required v. CMP0003

Brad King brad.king at kitware.com
Wed May 11 17:59:18 EDT 2011


Hi Gaëtan,

Warnings like this:

http://www.cdash.org/CDash/viewConfigure.php?buildid=1116597
CMake Warning (dev) at Wrapping/WrapITK/Languages/Java/CMakeLists.txt:146 (add_library):
  Policy CMP0003 should be set before this line.
  ...

should never appear in ITK anymore because we require at least
CMake 2.8.  However, a few lines in WrapITK still specify an
older version:

 $ git grep -i cmake_minimum_required -- master -- Wrapping |cat
 Wrapping/WrapITK/CMakeLists.txt:cmake_minimum_required(VERSION 2.4.5 FATAL_ERROR)
 Wrapping/WrapITK/ConfigureWrapping.cmake:cmake_minimum_required(VERSION 2.4.2 FATAL_ERROR)
 Wrapping/WrapITK/ExternalProjects/ItkVtkGlue/CMakeLists.txt:cmake_minimum_required(VERSION 2.8)
 Wrapping/WrapITK/ExternalProjects/PyBuffer/CMakeLists.txt:cmake_minimum_required(VERSION 2.4.2 FATAL_ERROR)

The 2.4 lines should be changed to 2.8 (or at least 2.6).  That will
ensure that CMP0003 is always set (to NEW) and warnings like the
above will never appear.

-Brad


More information about the Insight-developers mailing list